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).
This commit is contained in:
christos 2010-11-01 14:42:08 +00:00
parent a8684509ca
commit 29f0bfc6b2

View File

@ -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 @@ bootconf_start()
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