--- cryptsetup-1.6.1/debian/initramfs/cryptroot-script 2013-11-01 17:57:02.000000000 +0100 +++ cryptroot 2014-06-24 11:24:49.540304681 +0200 @@ -247,20 +247,24 @@ /bin/sleep 3 fi + cryptkeyaskpass="Unlocking the disk $cryptsource ($crypttarget)\nEnter passphrase: " if [ -z "$cryptkeyscript" ]; then - cryptkey="Unlocking the disk $cryptsource ($crypttarget)\nEnter passphrase: " + cryptkey="$(printf "$cryptkeyaskpass")" + cryptkeyaskpass="" if [ -x /bin/plymouth ] && plymouth --ping; then cryptkeyscript="plymouth ask-for-password --prompt" - cryptkey=$(printf "$cryptkey") - else - cryptkeyscript="/lib/cryptsetup/askpass" fi fi - if [ ! -e "$NEWROOT" ]; then - if ! crypttarget="$crypttarget" cryptsource="$cryptsource" \ - $cryptkeyscript "$cryptkey" | $cryptcreate --key-file=- ; then + if [ -n "$cryptkeyscript" ] ; then + mkfifo -m 0600 /lib/cryptsetup/passfifo + ( ( res=`crypttarget="$crypttarget" cryptsource="$cryptsource" \ + $cryptkeyscript "$cryptkey"` ;\ + echo -ne "${res}" > /lib/cryptsetup/passfifo ) & ) + fi + if ! crypttarget="$crypttarget" cryptsource="$cryptsource"\ + /lib/cryptsetup/askpass "$cryptkeyaskpass" | $cryptcreate --key-file=- ; then message "cryptsetup: cryptsetup failed, bad password or options?" continue fi