Subject: Re: etc chains...
To: NetBSD Users <netbsd-users@netbsd.org>
From: Nate Johnston <nmj3e@alumni.virginia.edu>
List: tech-pkg
Date: 02/05/2002 12:57:00
Charles Shannon Hendrix spake thus: (Mon, Feb 04, 2002 at 06:28:33PM -0500)
> I think it might be nice to have paramenters for rc script chaining to
> the other etc directories. I don't think I'd want it to be the default,
> but it would be nice for it to be built-in.
I wrote up this quick hack. It is just for me, and YMMV. No warranty
implied or expressed.
1.) I changed the 'files=' line in /etc/rc to read:
files=`rcorder -k /etc/rc -s nostart /etc/rc.d/*`
2.) I added the line
# KEYWORD: /etc/rc
to these files:
/etc/rc.d/raidframe
/etc/rc.d/ccd
/etc/rc.d/swap1
/etc/rc.d/fsck
/etc/rc.d/root
/etc/rc.d/mountcritlocal
/etc/rc.d/ttys
/etc/rc.d/bootconf.sh
/etc/rc.d/lkm1
/etc/rc.d/ipsec
/etc/rc.d/ipfilter
/etc/rc.d/sysctl
/etc/rc.d/network
/etc/rc.d/dhclient
/etc/rc.d/mountcritremote
/etc/rc.d/wscons
/etc/rc.d/sysdb
/etc/rc.d/syslogd
/etc/rc.d/ppp
/etc/rc.d/kdc
/etc/rc.d/savecore
/etc/rc.d/ipmon
/etc/rc.d/named
/etc/rc.d/ntpdate
/etc/rc.d/rpcbind
/etc/rc.d/ypserv
/etc/rc.d/ypbind
/etc/rc.d/yppasswdd
/etc/rc.d/lkm2
/etc/rc.d/mountall
3.) I created a script /etc/rc.d/rc2
#!/bin/sh
#
# rc2
# Run the scripts in /etc/rc.d with rcorder that rc doesn't anymore.
# REQUIRE: mountall
# KEYWORD: /etc/rc
. /etc/rc.subr
files=`rcorder -s /etc/rc -s nostart /etc/rc.d/* /usr/pkg/etc/rc.d/* /usr/X11R6/etc/rc.d/* /usr/local/etc/rc.d/*`
echo "Starting second-stage rc..."
for i in $files; do
run_rc_script $i start
done
--N.
--
Nate Johnston natej@aol.net
System Administrator 703-265-3232
America Online Internet Access