Subject: Re: etc chains...
To: NetBSD Users <>
From: Nate Johnston <>
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:


3.) I created a script /etc/rc.d/rc2

# 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


Nate Johnston                 
System Administrator                    703-265-3232
           America Online     Internet Access