--- rc.sysinit 2007-04-10 15:37:01.000000000 +0200 +++ rc.sysinit.crypt 2007-04-10 17:46:15.000000000 +0200 @@ -115,6 +115,19 @@ cpass="$3" shift 3 copts="$*" + # check which terminal we're using + if [ -z "$REDIRECT" ]; then + if (echo -n > /dev/tty) 2>/dev/null; then + REDIRECT=/dev/tty + else + REDIRECT=/dev/console + fi + fi + # /etc/crypttab: check if password is set to 'none' + if [ "$cpass" == "none" ]; then + echo "Password for \"$cname\" at $csrc: " + read -s -r cpass < $REDIRECT + fi stat_append "${cname}.." if [ "${cpass:0:1}" != "/" ]; then # For some fun reason, the parameter ordering varies for