Subject: Re: rc local [patches]
To: None <>
From: Greg Troxel <>
List: tech-userlevel
Date: 03/18/2007 11:57:10 writes:

> On Sun, Mar 18, 2007 at 11:01:22AM -0400, Greg Troxel wrote:
>> One concern I have about your naming change proposal is that it seems
>> to sort everything into "system" and "local".  But, there is a third
>> category "pkgsrc".  Currently, pkgsrc can install into rc.d, and that
>> seems to work quite well.
> pkgsrc are "local" additions. If this is not a problem putting pkgsrc
> scripts into /etc/rc.d/, why don't we simply put everything under /bin
> or /sbin ;)

pkgsrc isn't the same as local; it has a system to keep track of what
files are added.  Choosing to install a package is perhaps local (or
perhaps site).

> When doing an upgrade on a node, postinstall(8) is already a problem
> because one does not have the sources in all the cases. So running a
> diff against a reference tree is not always an option.

That's a valid point.

> Adding /etc/rc.d.local/ offers only one supplementary indication,
> without adding overhead or changing behavior. It is all benefits.

This seems like a reasonable step, even though it fails to address
site and pkgsrc.  Perhaps /etc/rc.d.pkgsrc should also exist, with
pkgsrc putting rc.d scripts there.

> I sent the patches to document a little more the rc start up process, so
> that it can be here to perhaps help others to discover possibilities,
> and help them ask themselves questions (one finds several tips about
> NetBSD local daemon addition, and they are not as good as they may be).

I've read your patch now.  I had expected that files in rc.d.local
would see only definitions in /etc/defaults/rc.d.local, and those in
rc.d only /etc/defaults/rc.d, but probably it's ok to commingle them.

The patch does a lot of things, including changing the definition of
'local' to 'site', changing advice about to do, and adding rc.d.local.
It seems like the most signficant change is /etc/rc.d.local.  We'll
see how others feel about this - there's a tension here between
minimal and good enough vs. complete.