1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-28 08:02:54 +00:00

Import the NetBSD 1.5 RC system on a vendor branch.

This commit is contained in:
David E. O'Brien 2001-06-22 17:27:58 +00:00
parent 9d62501fd8
commit 1220246fc5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/NetBSD/dist/; revision=78616
2 changed files with 81 additions and 0 deletions

43
etc/rc Normal file
View File

@ -0,0 +1,43 @@
#!/bin/sh
#
# $NetBSD: rc,v 1.152 2000/04/22 03:01:22 lukem Exp $
#
# rc.sh --
# Run the scripts in /etc/rc.d with rcorder.
# 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.
export HOME=/
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /etc/rc.subr
. /etc/rc.conf
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_run=yes # run_rc_command(): do fast booting
fi
stty status '^T'
# 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
files=`rcorder -s nostart /etc/rc.d/*`
for i in $files; do
run_rc_script $i start
done
date
exit 0

38
etc/rc.shutdown Normal file
View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# $NetBSD: rc.shutdown,v 1.3 2000/03/10 13:17:25 lukem Exp $
#
# rc.shutdown.sh --
# Run the scripts in /etc/rc.d with reverse rcorder.
export HOME=/
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /etc/rc.subr
. /etc/rc.conf
if ! checkyesno do_rcshutdown; then
echo "Skipping shutdown hooks."
exit 0
fi
stty status '^T'
# Set shell to ignore SIGINT (2), but not children;
# shell catches SIGQUIT (3) and returns to single user.
#
trap : 2
trap "echo 'Shutdown interrupted.'; exit 1" 3
files=`rcorder -k shutdown /etc/rc.d/*`
for i in $files; do # reverse order of files
nfiles="$i $nfiles"
done
files=$nfiles
for i in $files; do
run_rc_script $i stop
done
date
exit 0