Subject: /etc/rc.d stuff
To: None <tech-userlevel@netbsd.org>
From: Laine Stump <lainestump@rcn.com>
List: tech-userlevel
Date: 03/15/2000 01:48:33
I haven't been subscribed to tech-userlevel, so I've gotten in on this
discussion rather late (see my message in current-users). Sorry if any
of my comments are now outdated...

While reading through the archive of messages on this topic, I came
across a suggestion to add a /etc/rc.local.d (or /etc/rc.d/local, or
whatever) directory. There were some very good points in the responses
to this; I have another that I didn't see mentioned (although I might
have missed it):

In the case where a subsystem is already on the base system, and someone
installs something of the same name from pkgsrc (eg, a newer version of
sendmail), it shouldn't be necessary to remove /etc/rc.d/sendmail.
Instead, /etc/rc.d/pkg/sendmail (or *whatever* you call it - let's not
get into *that* discussion! ;-) should override it in some way. That
implies that some sort of configurable $RC_PATH (and support for its use
in rcorder) could be useful. Same thing goes if someone has, something
installed from pkgsrc, and does a hand-install of a newer version
themselves in /usr/local (and "/etc/rc.d/local").  Or is this already
taken care of in some other way.  (Of course I'm begging the question
about what to do when the *user* wants to run one of the scripts by hand
- how do you make *that* consistent? Maybe by telling people not to run
the scripts directly, but from some sort of wrapper instead? (eg "rcrun
sendmail stop"))

Along similar lines - some people say that they don't like having to
edit rc.conf to prevent a particular subsystem from running at startup,
and want to just remove the rc.d file to make it not run. Others say
that removing the file is a pain, because then it's more difficult to
turn it back on, and they would rather have rc.conf. Doesn't it work to
just do a chmod -x of the file?  (This might require an extra tweak to
rcorder to work really well; I'm not sure as I haven't looked at
rcorder, and I don't claim to fully understand everything that's going
on here yet anyway) (I still like having rc.conf there, although it is a
bit of a pain during the install)