diff options
author | Erich Eckner <git@eckner.net> | 2020-03-04 12:20:33 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-03-04 12:20:33 +0100 |
commit | 21c7e7269798d1e6970988a2e3f253c89e5fa02e (patch) | |
tree | 3793d0bf3ef5c6647ef804d2e24c9040109a0b06 | |
parent | 6a20623e21d56a1a24821f1934339c1d9572ca3f (diff) | |
download | cryptfs-daemon-21c7e7269798d1e6970988a2e3f253c89e5fa02e.tar.xz |
cryptfs: "ro" -> "--readonly"
-rw-r--r-- | cryptfs.bin.in | 10 |
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}" |