chkconfig missing? and some rc.conf questions/suggestions

joerg at britannica.bec.de joerg at britannica.bec.de
Thu Feb 9 14:20:35 PST 2006


On Thu, Feb 09, 2006 at 04:51:17PM -0500, Bob Bagwill wrote:
> On Thu, 09 Feb 2006 21:39:02 +0100, joerg wrote:
> 
> > On Thu, Feb 09, 2006 at 03:15:55PM -0500, Bob Bagwill wrote:
> >> 1) Is there any particular reason DBSD doesn't have a chkconfig script,
> >> like NetBSD?
> > 
> > ... which is not installed by default.
> 
> So it's not useful enough to install?

No idea.

> >> 2) How about having a copy of the relevant /etc/rc.d/foo script in
> >> /usr/src/usr.sbin/foo/, to keep related code together?
> > 
> > Why do you keeping the few daemons together with the corresponding rc
> > script is better than keeping the rc scripts together as reflected by
> > the directory structure?
> 
> For the same reason that man pages are kept in the same directory as
> the source?

Well, documentation and code makes sense. But keep in mind that e.g.
kernel documentation is not scattered over src/sys. For the rc scripts
it makes a lot more sense to have them in one place, since they interact
with each other. I don't want to have to look over src/sbin/, libexec/ usr.sbin/
and where else just to find out which place I need to tweak to achieve a
certain order.

> > Also keep in mind that not every rc script has a corresponding daemon.
> 
> Does every deamon have an rc script?  Is there any way of telling, besides
> comparing /etc/rc.d/* to /usr/sbin/* ?  Is there a way of enumerating all
> the daemons on the system (including ones from pkgsrc)?

No such way. How should there? Also the stand-alone operation might not
be the prefered modus operandi, e.g. ftpd makes sense from inetd as
well.

> >> 3) Would it be possible to establish some conventions so that rc.conf(5)
> >> could be generated automatically?
> > 
> > What kind of convention prevents you from that?
> > ...
> > Many parts of rc.conf are similiar enough so that shouldn't be such a
> > big deal.
> 
> Off hand, I don't see any easy way to extract tweakable variables from
> the source or rc.d/* files.

Depends on what you want. The activation flag is shown by $rc rcvar, but
the various configuration options for some scripts are certainly not
printed, if they exist. Typical examples are ${name}_flags, but other
much wilder example exists (e.g. consider netif).

That's also the reason why just masking them as options or so doesn't
make much sense, since the results of changes are too different to work
without specific handling anyway. Once you need the specific
case-by-case handling, the marking doesn't make much sense either.

Joerg





More information about the Users mailing list