X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-helpers;h=771ab85aedd9fa9f89e960c179576927b18bb687;hb=9211faa0a71579dcf6c4f193804dd5443bb40bf9;hp=807553a694becf5eff5457fe6d92cc7851d03e72;hpb=81e1d86af544ba5afb1bc2a91de9221f6c4e77ec;p=live-boot-grml.git diff --git a/scripts/live-helpers b/scripts/live-helpers index 807553a..771ab85 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -35,8 +35,8 @@ get_fstype () local FSSIZE # fstype misreports LUKS devices - is_luks "${1}" - if [ $? -eq 0 ]; then + if is_luks "${1}" + then /lib/udev/vol_id -t ${1} 2>/dev/null return fi @@ -178,9 +178,10 @@ setup_loop () do load_keymap - echo -n "Enter passphrase for ${fspath}: " >&6 + echo -n "Enter passphrase for root filesystem: " >&6 read -s passphrase echo "${passphrase}" > /tmp/passphrase + unset passphrase exec 9&6 + echo + echo -n "There was an error decrypting the root filesystem ... Retry? [Y/n] " >&6 read answer - if [ 'no' = "${answer}" ] + if [ "$(echo "${answer}" | cut -b1 | tr A-Z a-z)" = "n" ] then unset answer break @@ -319,8 +321,8 @@ is_luks() devname="${1}" if [ -x /sbin/cryptsetup ] then - /sbin/cryptsetup isLuks "${devname}" 2>/dev/null - return $? + /sbin/cryptsetup isLuks "${devname}" 2>/dev/null || ret=${?} + return ${ret} else return 1 fi