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