diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2001-06-22 17:27:58 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2001-06-22 17:27:58 +0000 |
commit | 1220246fc549adf81ade5c4cd824d90182e3aa61 (patch) | |
tree | 1071f95c43919dc2b9b422776aae3f6f5a4c42af | |
parent | 9d62501fd8278c7cde01dcb4d0f2b3c7c757bf86 (diff) |
Import the NetBSD 1.5 RC system on a vendor branch.
Notes
Notes:
svn path=/vendor/NetBSD/dist/; revision=78616
-rw-r--r-- | etc/rc | 43 | ||||
-rw-r--r-- | etc/rc.shutdown | 38 |
2 files changed, 81 insertions, 0 deletions
diff --git a/etc/rc b/etc/rc new file mode 100644 index 000000000000..19f62e74d9df --- /dev/null +++ b/etc/rc @@ -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 diff --git a/etc/rc.shutdown b/etc/rc.shutdown new file mode 100644 index 000000000000..bccf8360f485 --- /dev/null +++ b/etc/rc.shutdown @@ -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 |