Subject: Re: rc local [patches]
To: Thierry Laronde <>
From: Greg A. Woods <>
List: tech-userlevel
Date: 03/19/2007 21:41:57
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

At Mon, 19 Mar 2007 10:17:20 +0100,
Thierry Laronde wrote:
> No, the keep it simple principle is precisely add two supplementary
> directories because:
> 	1) This does not add any overhead;

Really?  Having two or mroe separate places with no logical reason for
them adds enormous overhead, especially inside the head of the poor
hapless administrator who will have to remember what is where.

No, thanks, but _really_, K.I.SIMPLE.S. please!

> 	2) This eases upgrades: /etc/rc.d/ is reserved for NetBSD (in the
> 	other mail you mention that you have _changed_ base and etc.tgz so
> 	to get rid of postinstall(8) running in /etc/rc.d/. If things are
> 	great as they are now why did you do that?

I have no idea what your real problem is here.  I've been upgrading
systems with one lone /etc/rc.d and yet with lots of add-on software
since almost when /etc/rc.d first appeared.

If you are managing a system with locally added software and you don't
know exactly what files have been added then you need to fix that
problem, not some other ancillary problem.

Magnifying the complexity of the system by orders of magnitude just for
the sake of isolating files that really belong all in the same place is
no answer.

If you really want to make your life as an admin easier then use pkg_*
exclusively and you won't forget what's where, nor will you have
unintended clashes, and eventually with syspkg even system upgrades will
work well with your addons.

> 	3) This eases administration because with one glance I can
> 	immediately see what are additions;

Nope.  It definitely does not ease any admin task, not even that of
remembering what is added on.

Your proposal for separate rc.d directories really does increase the
complexity of managing system and services startup and shutdown by at
least an order of magnitude for every separation, and it doesn't have
any real benefit even for the simple task of identifying addons.

For a short time I had hacks to make /usr/pkg/etc/rc.d be the separate
place for all things pkg_* controlled, but I very soon got very tired of
having to remember what was where and even sooner got very tired of
having to type the extra path prefix every time even if I did remember.

If you really want to be able to quickly find local addons vs. system
stuff then just look for the $NetBSD identifiers in the ident tag lines.
Just use what's already there.

> 	4) This eases usage because this will enforce documenting variables
> 	setting for added daemons, especially for pkgsrc users to  have all
> 	the documentation in one file, =81=E0 la /etc/defaults/rc.conf, namely
> 	a /etc/rc.defaults.pkgsrc

Again, K.I.S.S.  PLEASE!

We already have the far more than sufficient /etc/rc.conf.d when
necessary.  We sure as heck don't need yet more places to lose things in.

You really don't want to separate defaults for pkg rc.d scripts from the
scripts themselves -- just use the right shell script idioms for setting
default variable values.

Even more so you do NOT want to be adding "${rcvar}=3DNO" default settings
anywhere automatically for addon packages -- the "${rcvar} is not set
properly" messages at boot time really are for the admin's own good.

						Greg A. Woods

H:+1 416 218-0098 W:+1 416 489-5852 x122 VE3TCP RoboHack <>
Planix, Inc. <>       Secrets of the Weird <>

Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

Version: PGPfreeware 5.0i for non-commercial use
MessageID: C1TyaqTxySuHmv/n2XgAt2qkmpOrRS/p