I made some changes to the script such that it works for me. In particular, I wanted to be able to mount the disk with a password rather than a keyfile. The changed script now supports both ways.
The proposed changes come in several small commits. I hope the individual commit messages speak for themselves.
The changes should leave the script almost "backward-compatible". Probably the most notable changes are
the script now checks for superuser permissions up-front,
the script now returns error code 66 rather than 33 if $volume does not exist.
I made some changes to the script such that it works for me. In particular, I wanted to be able to mount the disk with a password rather than a keyfile. The changed script now supports both ways.
The proposed changes come in several small commits. I hope the individual commit messages speak for themselves.
The changes should leave the script almost "backward-compatible". Probably the most notable changes are