2000-03-10 16:15:58 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $NetBSD: rc,v 1.149 2000/03/10 13:15:58 lukem Exp $
|
|
|
|
#
|
|
|
|
# rc.sh --
|
|
|
|
# Run the scripts in /etc/rc.d with rcorder.
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
# System startup script run by init on autoboot or after single-user.
|
|
|
|
# Output and error are redirected to console by init, and the console
|
|
|
|
# is the controlling terminal.
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-03-10 12:34:59 +03:00
|
|
|
export HOME=/
|
2000-03-10 16:15:58 +03:00
|
|
|
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
1999-10-05 14:32:56 +04:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
. /etc/rc.subr
|
|
|
|
. /etc/rc.conf
|
1997-03-10 12:16:13 +03:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
if [ "$1" = autoboot ]; then
|
|
|
|
autoboot=yes
|
|
|
|
_rc_fast_run=yes # run_rc_command(): do fast booting
|
1999-07-03 07:29:29 +04:00
|
|
|
fi
|
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
stty status '^T'
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
# Set shell to ignore SIGINT (2), but not children;
|
|
|
|
# shell catches SIGQUIT (3) and returns to single user.
|
|
|
|
#
|
|
|
|
trap : 2
|
|
|
|
trap "echo 'Boot interrupted.'; exit 1" 3
|
1997-04-19 07:10:57 +04:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
files=`rcorder /etc/rc.d/*`
|
1999-03-26 16:45:47 +03:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
for i in $files; do
|
|
|
|
run_rc_script $i start
|
|
|
|
done
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
date
|
|
|
|
exit 0
|