1 #!/bin/sh 2 # 3 # $NetBSD: rc,v 1.155 2001/02/28 16:49:18 lukem Exp $ 4 # 5 # rc -- 6 # Run the scripts in /etc/rc.d with rcorder. 7 8 # System startup script run by init(8) 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 _rc_conf_loaded=YES 18 19 if ! checkyesno rc_configured; then 20 echo "/etc/rc.conf is not configured. Multiuser boot aborted." 21 exit 1 22 fi 23 24 if [ "$1" = autoboot ]; then 25 autoboot=yes 26 _rc_fast_run=yes # run_rc_command(): do fast booting 27 fi 28 29 stty status '^T' 30 31 # Set shell to ignore SIGINT (2), but not children; 32 # shell catches SIGQUIT (3) and returns to single user. 33 # 34 trap : 2 35 trap "echo 'Boot interrupted.'; exit 1" 3 36 37 files=`rcorder -s nostart /etc/rc.d/*` 38 39 date 40 41 for _rc_elem in $files; do 42 run_rc_script $_rc_elem start 43 done 44 45 date 46 exit 0 47