summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-03-04 12:20:33 +0100
committerErich Eckner <git@eckner.net>2020-03-04 12:20:33 +0100
commit21c7e7269798d1e6970988a2e3f253c89e5fa02e (patch)
tree3793d0bf3ef5c6647ef804d2e24c9040109a0b06
parent6a20623e21d56a1a24821f1934339c1d9572ca3f (diff)
downloadcryptfs-daemon-21c7e7269798d1e6970988a2e3f253c89e5fa02e.tar.xz
cryptfs: "ro" -> "--readonly"
-rw-r--r--cryptfs.bin.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/cryptfs.bin.in b/cryptfs.bin.in
index 3378588..d9a358f 100644
--- a/cryptfs.bin.in
+++ b/cryptfs.bin.in
@@ -319,8 +319,12 @@ do_mdadm_stop() {
printf '%s\n' "${crypttab}" | \
grep -vxF '' | \
- while read -r name raw key; do
- key="${key%% *}"
+ while read -r name raw key options; do
+ if [ "x${options}" = 'xro' ]; then
+ options='--readonly'
+ else
+ unset options
+ fi
if [ "${key#\[*]}" != "${key}" ]; then
key_slot_option="${key%%]*}"
key_slot_option='--key-slot='"${key_slot_option#\[}"''
@@ -350,7 +354,7 @@ printf '%s\n' "${crypttab}" | \
else
if [ -n "${key}" ]; then
printf '0 do_mount %s\n' "${key_mount}"
- printf '1 do_crypt_open %s\n' "${name} ${raw} ${key} ${key_slot_option}"
+ printf '1 do_crypt_open %s\n' "${name} ${raw} ${key} ${key_slot_option} ${options}"
printf '2 do_unmount -l %s\n' "${key_mount}"
else
printf '3 do_integrity_open %s\n' "${name} ${raw}"