diff --git a/modules.d/90crypt/crypt-lib.sh b/modules.d/90crypt/crypt-lib.sh index eee60fb2..9083acaa 100644 --- a/modules.d/90crypt/crypt-lib.sh +++ b/modules.d/90crypt/crypt-lib.sh @@ -95,12 +95,12 @@ $dev # # Reads file produced by probe-keydev and looks for first line to # which device matches. The successful result is printed in format -# "|". When nothing found, just false is returned. +# ":". When nothing found, just false is returned. # # Example: # getkey /tmp/luks.keys /dev/sdb1 # May print: -# /dev/sdc1|/keys/some.key +# /dev/sdc1:/keys/some.key getkey() { local keys_file="$1"; local for_dev="$2" local luks_dev; local key_dev; local key_path @@ -108,9 +108,9 @@ getkey() { [ -z "$keys_file" -o -z "$for_dev" ] && die 'getkey: wrong usage!' [ -f "$keys_file" ] || return 1 - while IFS='|' read luks_dev key_dev key_path; do + while IFS=':' read luks_dev key_dev key_path; do if match_dev "$luks_dev" "$for_dev"; then - echo "${key_dev}|${key_path}" + echo "${key_dev}:${key_path}" return 0 fi done < "$keys_file" diff --git a/modules.d/90crypt/cryptroot-ask.sh b/modules.d/90crypt/cryptroot-ask.sh index bb8e81ee..5150688d 100755 --- a/modules.d/90crypt/cryptroot-ask.sh +++ b/modules.d/90crypt/cryptroot-ask.sh @@ -62,8 +62,8 @@ info "luksOpen $device $luksname" if [ -n "$(getarg rd.luks.key)" ]; then if tmp=$(getkey /tmp/luks.keys $device); then - keydev="${tmp%%|*}" - keypath="${tmp#*|}" + keydev="${tmp%%:*}" + keypath="${tmp#*:}" else info "No key found for $device. Will try later." /sbin/initqueue --unique --onetime --settled \ diff --git a/modules.d/90crypt/probe-keydev.sh b/modules.d/90crypt/probe-keydev.sh index 8fdbc1a3..04a0e096 100755 --- a/modules.d/90crypt/probe-keydev.sh +++ b/modules.d/90crypt/probe-keydev.sh @@ -12,4 +12,4 @@ info "Probing $real_keydev for $keypath..." test_dev -f "$real_keydev" "$keypath" || exit 1 info "Found $keypath on $real_keydev" -echo "$luksdev|$real_keydev|$keypath" >> /tmp/luks.keys +echo "$luksdev:$real_keydev:$keypath" >> /tmp/luks.keys