From 21c7e7269798d1e6970988a2e3f253c89e5fa02e Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 4 Mar 2020 12:20:33 +0100 Subject: cryptfs: "ro" -> "--readonly" --- cryptfs.bin.in | 10 +++++++--- 1 file 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}" -- cgit v1.2.3-70-g09d2