Module Name: src
Committed By: christos
Date: Mon Nov 1 14:42:08 UTC 2010
Modified Files:
src/etc/rc.d: bootconf.sh
Log Message:
>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).
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/etc/rc.d/bootconf.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/rc.d/bootconf.sh
diff -u src/etc/rc.d/bootconf.sh:1.13 src/etc/rc.d/bootconf.sh:1.14
--- src/etc/rc.d/bootconf.sh:1.13 Sat Sep 12 13:40:01 2009
+++ src/etc/rc.d/bootconf.sh Mon Nov 1 10:42:08 2010
@@ -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