This is my first post to this list, so.. Hi everybody! :-)

I noticed that the initscript (/etc/rc.sysinit) supports encrypted volumes, 
but doesn't probe for 'none' as password. I've created a small patch to be 
able to enter a password at boottime, instead of storing it in /etc/crypttab 
directly.

Kevin Bader
--- 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

Attachment: pgpD1hOn4nelr.pgp
Description: PGP signature

_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch

Reply via email to