1 #!/bin/sh 2 # 3 # $NetBSD: rc,v 1.160 2002/04/18 07:18:05 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 umask 022 15 16 . /etc/rc.subr 17 . /etc/rc.conf 18 _rc_conf_loaded=YES 19 20 if ! checkyesno rc_configured; then 21 echo "/etc/rc.conf is not configured. Multiuser boot aborted." 22 exit 1 23 fi 24 25 if [ "$1" = autoboot ]; then 26 autoboot=yes 27 rc_fast=yes # run_rc_command(): do fast booting 28 fi 29 30 stty status '^T' 31 32 # Set shell to ignore SIGINT, but not children; 33 # shell catches SIGQUIT and returns to single user. 34 # 35 trap : INT 36 trap "echo 'Boot interrupted.'; exit 1" QUIT 37 38 date 39 40 files=`rcorder -s nostart /etc/rc.d/*` 41 42 for _rc_elem in $files; do 43 run_rc_script $_rc_elem start 44 done 45 46 date 47 exit 0 48