From 29f0bfc6b2a731c31d6a186089d45f93f08cb397 Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 1 Nov 2010 14:42:08 +0000 Subject: [PATCH] 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). --- etc/rc.d/bootconf.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/rc.d/bootconf.sh b/etc/rc.d/bootconf.sh index c3f25ecde1b0..efca8aa187af 100755 --- a/etc/rc.d/bootconf.sh +++ b/etc/rc.d/bootconf.sh @@ -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