[BACK]Return to rc CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc

File: [cvs.NetBSD.org] / src / etc / rc (download)

Revision 1.152, Sat Apr 22 03:01:22 2000 UTC (19 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.151: +2 -2 lines

revert previous; the fast-start functionality already existed, and
works at multi-user boot. (starting /etc/rc after single user boot
doesn't exhibit this fast start behaviour).

#!/bin/sh
#
# $NetBSD: rc,v 1.152 2000/04/22 03:01:22 lukem Exp $
#
# rc.sh --
#	Run the scripts in /etc/rc.d with rcorder.

#	System startup script run by init on autoboot or after single-user.
#	Output and error are redirected to console by init, and the console
#	is the controlling terminal.

export HOME=/
export PATH=/sbin:/bin:/usr/sbin:/usr/bin

. /etc/rc.subr
. /etc/rc.conf

if ! checkyesno rc_configured; then
	echo "/etc/rc.conf is not configured.  Multiuser boot aborted."
	exit 1
fi

if [ "$1" = autoboot ]; then
	autoboot=yes
	_rc_fast_run=yes	# run_rc_command(): do fast booting
fi

stty status '^T'

#	Set shell to ignore SIGINT (2), but not children;
#	shell catches SIGQUIT (3) and returns to single user.
#
trap : 2
trap "echo 'Boot interrupted.'; exit 1" 3

files=`rcorder /etc/rc.d/*`

for i in $files; do
	run_rc_script $i start
done

date
exit 0