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