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