rc revision 1.149
1#!/bin/sh
2#
3# $NetBSD: rc,v 1.149 2000/03/10 13:15:58 lukem Exp $
4#
5# rc.sh --
6#	Run the scripts in /etc/rc.d with rcorder.
7
8#	System startup script run by init on autoboot or after single-user.
9#	Output and error are redirected to console by init, and the console
10#	is the controlling terminal.
11
12export HOME=/
13export PATH=/sbin:/bin:/usr/sbin:/usr/bin
14
15. /etc/rc.subr
16. /etc/rc.conf
17
18if [ "$1" = autoboot ]; then
19	autoboot=yes
20	_rc_fast_run=yes	# run_rc_command(): do fast booting
21fi
22
23stty status '^T'
24
25#	Set shell to ignore SIGINT (2), but not children;
26#	shell catches SIGQUIT (3) and returns to single user.
27#
28trap : 2
29trap "echo 'Boot interrupted.'; exit 1" 3
30
31files=`rcorder /etc/rc.d/*`
32
33for i in $files; do
34	run_rc_script $i start
35done
36
37date
38exit 0
39