1 1.149 lukem #!/bin/sh 2 1.149 lukem # 3 1.149 lukem # $NetBSD: rc,v 1.149 2000/03/10 13:15:58 lukem Exp $ 4 1.149 lukem # 5 1.149 lukem # rc.sh -- 6 1.149 lukem # Run the scripts in /etc/rc.d with rcorder. 7 1.149 lukem 8 1.149 lukem # System startup script run by init 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.50 thorpej 18 1.149 lukem if [ "$1" = autoboot ]; then 19 1.149 lukem autoboot=yes 20 1.149 lukem _rc_fast_run=yes # run_rc_command(): do fast booting 21 1.50 thorpej fi 22 1.107 tron 23 1.149 lukem stty status '^T' 24 1.1 cgd 25 1.149 lukem # Set shell to ignore SIGINT (2), but not children; 26 1.149 lukem # shell catches SIGQUIT (3) and returns to single user. 27 1.149 lukem # 28 1.149 lukem trap : 2 29 1.38 cgd trap "echo 'Boot interrupted.'; exit 1" 3 30 1.1 cgd 31 1.149 lukem files=`rcorder /etc/rc.d/*` 32 1.40 cgd 33 1.149 lukem for i in $files; do 34 1.149 lukem run_rc_script $i start 35 1.149 lukem done 36 1.1 cgd 37 1.1 cgd date 38 1.1 cgd exit 0 39