--- mkinitrd 2009-05-10 01:03:27.864542887 +0200 +++ mkinitrd 2009-05-10 12:19:38.000000000 +0200 @@ -1582,6 +1582,7 @@ if [ $ncryptodevs -ne 0 ]; then inst /sbin/cryptsetup "$MNTIMAGE" inst /usr/libexec/askpass "$MNTIMAGE" /sbin/askpass + inst /bin/dash.static "$MNTIMAGE" /bin/dash KEYTABLE= KEYMAP= @@ -1746,11 +1747,21 @@ { #emit "echo Setting up disk encryption: $1" #emit "plymouth ask-for-password --command \"cryptsetup luksOpen $1 $2\"" - emit "echo waiting for encrypted device $1 to appear (timeout 1min)" emit "waitdev --timeout=60000000 $1" emit "mkblkdevs" emit "askpass \"Enter passphrase to unlock the disk $1 ($2): \" /sbin/cryptsetup -T 1 --key-file=- luksOpen $1 $2" + + emit "/bin/dash /cryptsh $1 $2" + CRYPTSH=$MNTIMAGE/cryptsh + if [ ! -f $CRYPTSH ]; + then + echo "#!/bin/dash" > $CRYPTSH + echo "while [ ! -e /dev/mapper/\$2 ]; do" >> $CRYPTSH + echo "askpass \"Enter passphrase to unlock the disk \$1 (\$2): \" /sbin/cryptsetup -T 1 --key-file=- luksOpen \$1 \$2" >> $CRYPTSH + echo "done" >> $CRYPTSH + chmod +x $CRYPTSH + fi } if [ -n "$KEYMAP" ]; then