Subject: Re: rc.d config file proposal
To: tech-userlevel@netbsd.org, <frank@wins.uva.nl>
From: None <alexis@panix.com>
List: tech-userlevel
Date: 03/16/2000 01:37:51
Aidan wrote:
> On Wed, Mar 15, 2000 at 08:06:37PM +0100, Frank van der Linden wrote:
> ...
> > 2) Have /etc/rc.pkg.d, /etc/rc.local.d, and their counterparts,
> >    /etc/rc.pkg.conf.d and /etc/rc.local.conf.d (or other names,
> >    but they're seperate directories somewhere in /etc). In
> >    rc.subr, do something like:
> > 
> > 	. /etc/rc.$confbase.conf
> 	^^^^^^^^^^^^^^^^^^^^^^^^
> Can this be just
> . /etc/rc.conf
> where /etc/rc.conf contains as its last two lines
> . /etc/rc.pkg.conf (is this necessary?)
> . /etc/rc.local.conf
> ?  Where I used to work, it was very useful to us to be able to say
> things like ifconfig_fxp0="inet_addr" from rc.local.conf.  This may
> be less of an issue if we could use /etc/rc.conf.d/network.conf
> to configure the network, but why not have all the variables
> accessible to every start/stop script?

Our setup was actually more structured than that (see below) but it was *very*
useful to have rc.conf pick up local things automatically. I would suggest
making similar changes (to include local addenda) to any other files in
rc.conf.d that could benefit. ("Benefit" = often need to be suplemented,
but rarely need to be modified.)

This is what ours looks like. We've got all those different layers because
this runs on lots of machines, which are configured and built in those layers.
I don't think NetBSD need this level of complexity though. :-)

> if [ -f /etc/rc.conf.panix ] ; then
>         . /etc/rc.conf.panix
> fi
> if [ -f /etc/rc.conf.class ] ; then
>         . /etc/rc.conf.class
> fi
> if [ -f /etc/rc.conf.subclass ] ; then
>         . /etc/rc.conf.subclass
> fi
> if [ -f /etc/rc.conf.unique ] ; then
>         . /etc/rc.conf.unique
> fi

/a