Subject: /etc/rc faststart back door
To: None <tech-userlevel@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-userlevel
Date: 04/18/2000 16:59:28
The following allows for /etc/rc to set a back door to allow rc.subr
aware scripts to use "faststart" to skip the process check.  Any
better suggestions for this approach?

A "checkyesnoquiet" might be be nice - one that's quiet if the variable
isn't set at all...

Simon.
--
Index: rc
===================================================================
RCS file: /cvsroot/basesrc/etc/rc,v
retrieving revision 1.150
diff -p -u -r1.150 rc
--- rc	2000/03/29 02:13:51	1.150
+++ rc	2000/04/18 06:18:44
@@ -36,7 +36,7 @@ trap "echo 'Boot interrupted.'; exit 1" 
 files=`rcorder /etc/rc.d/*`
 
 for i in $files; do
-	run_rc_script $i start
+	rc_fastboot=yes run_rc_script $i start
 done
 
 date
Index: rc.subr
===================================================================
RCS file: /cvsroot/basesrc/etc/rc.subr,v
retrieving revision 1.11
diff -p -u -r1.11 rc.subr
--- rc.subr	2000/03/10 11:39:27	1.11
+++ rc.subr	2000/04/18 06:18:44
@@ -233,6 +234,12 @@ run_rc_command()
 		err 3 'neither $rcvar or $name is set.'
 	fi
 
+	if [ ! -z "$rc_fastboot" ]; then
+		if checkyesno rc_fastboot; then
+			_arg=fast$_arg
+		fi
+	fi
+
 	case "$_arg" in
 	fast*)
 		_arg=${_arg#fast}