Subject: Re: On the proposal to augment NetBSD startup (/etc/rc*/*/*...)
To: Giles Lean <email@example.com>
From: Curt Sampson <firstname.lastname@example.org>
Date: 12/05/1999 18:16:03
On Sun, 5 Dec 1999, Giles Lean wrote:
> > Michael Graff writes:
> > > One thing the init.d method doesn't fix, however, is the problem of
> > > options. Or is there a /etc/config.d associated with these things?
> > What doesn't rc.conf provide in this case? I.e, rc.conf provides this!
> Mmm ... yes, but it would still require in place editing of rc.conf
> when a new init.d script is installed? A detail, but one that makes a
> difference for progamatic installation of new scripts.
Actually, nothing *needs* to be added to rc.conf for installation
of new scripts; the scripts default to doing something `reasonable'
if their variables are not set. So if you add, say, apache, and
you don't have anything in /etc/rc.conf, it simply doesn't run. If
you have just apache=YES, it will chose a reasonable set of command
line options. And of course if you have both, it will do what you
Luke said he can could fairly easily add something to his code that
will let you query an init.d script to see what variables it uses.
Given this, it's a pretty easy shell script to query them all and
tell you which variables exist that you're not using in /etc/rc.conf.
If the output is the variables with defalt options, making sure
your rc.conf is up to date is as simple as running the script and
appending the output to rc.conf.
Personally, I think that modifying shell scripts (and rc.conf is
a shell script, not just a list of variables and values) programatically
is always a somewhat risky business, and I'd prefer that nothing
to it unless explicitly asked. So while I'd be happy to see a nice
linuxconf-like menu-drive rc.conf editing tool, I really don't
think that package installs and suchlike should modify /etc/rc.conf.
Curt Sampson <email@example.com> 917 532 4208 De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: http://www.netbsd.org