2000-03-10 16:15:58 +03:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2003-01-04 18:27:43 +03:00
|
|
|
# $NetBSD: rc,v 1.162 2003/01/04 15:27:43 lukem Exp $
|
2000-03-10 16:15:58 +03:00
|
|
|
#
|
2000-12-15 03:00:09 +03:00
|
|
|
# rc --
|
2000-03-10 16:15:58 +03:00
|
|
|
# Run the scripts in /etc/rc.d with rcorder.
|
1993-03-21 12:45:37 +03:00
|
|
|
|
2000-12-15 03:00:09 +03:00
|
|
|
# System startup script run by init(8) on autoboot or after single-user.
|
2000-03-10 16:15:58 +03:00
|
|
|
# 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
|
2001-05-09 20:53:45 +04:00
|
|
|
umask 022
|
1999-10-05 14:32:56 +04:00
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
. /etc/rc.subr
|
|
|
|
. /etc/rc.conf
|
2003-01-04 18:27:43 +03:00
|
|
|
_rc_conf_loaded=true
|
1997-03-10 12:16:13 +03:00
|
|
|
|
2000-03-29 06:13:51 +04:00
|
|
|
if ! checkyesno rc_configured; then
|
|
|
|
echo "/etc/rc.conf is not configured. Multiuser boot aborted."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2000-03-10 16:15:58 +03:00
|
|
|
if [ "$1" = autoboot ]; then
|
|
|
|
autoboot=yes
|
2002-04-18 11:18:05 +04:00
|
|
|
rc_fast=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
|
|
|
|
2001-06-14 11:50:06 +04:00
|
|
|
# Set shell to ignore SIGINT, but not children;
|
|
|
|
# shell catches SIGQUIT and returns to single user.
|
2000-03-10 16:15:58 +03:00
|
|
|
#
|
2001-06-14 11:50:06 +04:00
|
|
|
trap : INT
|
|
|
|
trap "echo 'Boot interrupted.'; exit 1" QUIT
|
1997-04-19 07:10:57 +04:00
|
|
|
|
2001-02-28 19:49:18 +03:00
|
|
|
date
|
|
|
|
|
2002-05-19 05:01:32 +04:00
|
|
|
files=$(rcorder -s nostart ${rc_rcorder_flags} /etc/rc.d/*)
|
2001-03-12 18:56:39 +03:00
|
|
|
|
2001-02-28 19:49:18 +03:00
|
|
|
for _rc_elem in $files; do
|
|
|
|
run_rc_script $_rc_elem start
|
2000-03-10 16:15:58 +03:00
|
|
|
done
|
1993-03-21 12:45:37 +03:00
|
|
|
|
|
|
|
date
|
|
|
|
exit 0
|