Subject: Re: rc.d network vs NETWORK
To: None <current-users@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 04/20/2001 04:01:07
[ On , April 20, 2001 at 08:40:55 (+0200), Tom Ivar Helbekkmo wrote: ]
> Subject: Re: rc.d network vs NETWORK
>
> Speaking of rc.d and rcorder: should there, perhaps, be an rc.conf
> variable one could set to make /etc/rc and /etc/rc.shutdown include
> /usr/pkg/etc/rc.d/* and/or /usr/local/etc/rc.d/* automatically?

you mean like this ($more_rc_d)?

#!/bin/sh
#
# $NetBSD: rc,v 1.156 2001/03/12 15:56:39 lukem Exp $
#
# rc.sh --
#	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

debug_echo=""

case "$1" in
autoboot)
	autoboot=yes
	_rc_fast_run=yes	# run_rc_command(): do fast booting
	;;
-d)
	debug_echo=echo
	;;
esac

. /etc/rc.subr
. /etc/rc.conf
_rc_conf_loaded=YES

if ! checkyesno rc_configured; then
	err 1 "/etc/rc.conf is not configured.  Multiuser boot aborted."
	exit 1
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

date

_all_rc_d_files=""
for _rc_d in /etc/rc.d ${more_rc_d} ; do
	if [ -d $_rc_d -a ! -h $_rc_d -a ".$(echo ${_rc_d}/*)" != ".${_rc_d}/\*" ]; then
		_all_rc_d_files="${_all_rc_d_files} $(echo ${_rc_d}/*)"
	fi
done

ordered_rc_d_files=$(rcorder ${_all_rc_d_files})

for _rc_elem in $ordered_rc_d_files; do
	$debug_echo run_rc_script $_rc_elem start
done

date
exit 0


-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>     <woods@robohack.ca>
Planix, Inc. <woods@planix.com>;   Secrets of the Weird <woods@weird.com>