1a286b1407
make them "externally" available: Previous Current Purpose -------- ------- ------- _arg rc_arg Argument to command, after fast/force processing performed (and prefix removed) _flags rc_flags Flags to start the default command with. Defaults to ${name}_flags, unless overridden by $flags from the environment. This variable may be changed by the precmd method. _pid rc_pid PID of command (if appropriate). _rc_run_fast rc_fast Not empty is "fast" was provided. _rc_run_force rc_force Not empty is "force" was provided. - Use rc_flags instead of _flags or ${name}_flags in various rc.d scripts, so that $flags from the environment overrides ${name}_flags from rc.conf(5). Fixes [bin/15800].
48 lines
923 B
Bash
48 lines
923 B
Bash
#!/bin/sh
|
|
#
|
|
# $NetBSD: rc,v 1.159 2002/03/22 04:16:38 lukem Exp $
|
|
#
|
|
# rc --
|
|
# Run the scripts in /etc/rc.d with rcorder.
|
|
|
|
# System startup script run by init(8) on autoboot or after single-user.
|
|
# Output and error are redirected to console by init, and the console
|
|
# is the controlling terminal.
|
|
|
|
export HOME=/
|
|
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
|
umask 022
|
|
|
|
. /etc/rc.subr
|
|
. /etc/rc.conf
|
|
_rc_conf_loaded=YES
|
|
|
|
if ! checkyesno rc_configured; then
|
|
echo "/etc/rc.conf is not configured. Multiuser boot aborted."
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$1" = autoboot ]; then
|
|
autoboot=yes
|
|
rc_fast=YES # run_rc_command(): do fast booting
|
|
fi
|
|
|
|
stty status '^T'
|
|
|
|
# Set shell to ignore SIGINT, but not children;
|
|
# shell catches SIGQUIT and returns to single user.
|
|
#
|
|
trap : INT
|
|
trap "echo 'Boot interrupted.'; exit 1" QUIT
|
|
|
|
date
|
|
|
|
files=`rcorder -s nostart /etc/rc.d/*`
|
|
|
|
for _rc_elem in $files; do
|
|
run_rc_script $_rc_elem start
|
|
done
|
|
|
|
date
|
|
exit 0
|