Home | History | Annotate | Line # | Download | only in etc
rc revision 1.152
      1 #!/bin/sh
      2 #
      3 # $NetBSD: rc,v 1.152 2000/04/22 03:01:22 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 
     12 export HOME=/
     13 export PATH=/sbin:/bin:/usr/sbin:/usr/bin
     14 
     15 . /etc/rc.subr
     16 . /etc/rc.conf
     17 
     18 if ! checkyesno rc_configured; then
     19 	echo "/etc/rc.conf is not configured.  Multiuser boot aborted."
     20 	exit 1
     21 fi
     22 
     23 if [ "$1" = autoboot ]; then
     24 	autoboot=yes
     25 	_rc_fast_run=yes	# run_rc_command(): do fast booting
     26 fi
     27 
     28 stty status '^T'
     29 
     30 #	Set shell to ignore SIGINT (2), but not children;
     31 #	shell catches SIGQUIT (3) and returns to single user.
     32 #
     33 trap : 2
     34 trap "echo 'Boot interrupted.'; exit 1" 3
     35 
     36 files=`rcorder /etc/rc.d/*`
     37 
     38 for i in $files; do
     39 	run_rc_script $i start
     40 done
     41 
     42 date
     43 exit 0
     44