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