Mon Nov 1 14:42:08 2010 UTC ()
From Anon Ymous:
Send the SIGALRM to the correct process when we timeout. See the note
in src/etc/rc regarding RC_PID.

The former code would leave you with a root shell when the prompt
timed out (if the tty is marked secure) while continuing the boot
process in another shell.  This was easily hidden if you started
xdm(1) at boot, while the root shell remains on another tty
(accessible with CTL-ALT-F1).


(christos)
diff -r1.13 -r1.14 src/etc/rc.d/bootconf.sh

cvs diff -r1.13 -r1.14 src/etc/rc.d/bootconf.sh (expand / switch to context diff)
--- src/etc/rc.d/bootconf.sh 2009/09/12 17:40:01 1.13
+++ src/etc/rc.d/bootconf.sh 2010/11/01 14:42:08 1.14
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: bootconf.sh,v 1.13 2009/09/12 17:40:01 apb Exp $
+# $NetBSD: bootconf.sh,v 1.14 2010/11/01 14:42:08 christos Exp $
 #
 
 # PROVIDE: bootconf
@@ -50,13 +50,12 @@
 		esac
 	done
 	echo
-	master=$$
 	_DUMMY=/etc/passwd
 	conf=${_DUMMY}
 	while [ ! -d /etc/etc.$conf/. ]; do
 		trap "conf=$default; echo; echo Using default of $default" ALRM
 		echo -n "Which configuration [$default] ? "
-		(sleep 30 && kill -ALRM $master) >/dev/null 2>&1 &
+		(sleep 30 && kill -ALRM $RC_PID) >/dev/null 2>&1 &
 		read conf
 		trap : ALRM
 		if [ -z $conf ] ; then