Subject: Re: Keeping /etc/defaults and /etc/rc.d in-sync
To: Laine Stump <lainestump@rcn.com>
From: Greywolf <greywolf@starwolf.com>
List: tech-userlevel
Date: 12/26/2001 18:54:47
On 26 Dec 2001, Laine Stump wrote:

# Frederick Bruckman <fredb@immanent.net> writes:
#
# > Besides, it's not true that "rc.d" has no user configurable parts
# > inside. As we've totally failed to come to any agreement on how to
# > handle pkgsrc rc.d scripts, we tell people to copy them into rc.d
# > themselves.
#
# Leading me to wonder out loud if maybe there shouldn't be two stages
# of rc.d, for example's sake call them "/etc/rc.d.defaults" (or maybe
# /etc/defaults/rc.d) and "/etc/rc.d". The former would contain the
# "factory" versions of all the files, and would be automatically
# updated by a make build, or a binary upgrade, while the latter would
# not be touched by either operation. The two directories would be
# treated kind of like a union file system, with files in /etc/rc.d
# taking precedence over the same file in /etc/rc.d/defaults.

1.  Isn't /etc/rc.d/* supposed to depend upon stuff from /etc/rc.conf,
    and not need mangling?

2.  Isn't /etc/defaults/rc.conf the distribution default from which we
    derive /etc/rc.conf?

3.  Isn't this why we split everything into /etc/rc.d from /etc/rc
    ( requiring subsequent performance tuning ) in the first place?

The files in /etc/rc.d are supposed to be sacrosanct and tunable by
rc.conf.  One should NOT have to mangle ANYTHING inside an /etc/rc.d/*
file.  If this is not the case, then we need to make it so.

Whatever happened to the KISS principle?  We seem to be getting lost in
the mire, here.  Again.  What is our primary focus?  Are we going feature
hunting again?

# > [...] I have learned my lesson not to try to customize anything in
# > "/usr" that would be overwritten, but "/etc" is supposed to be the
# > safe haven.

/etc is safe insofar as it is saved to /etc.old during an upgrade, from
which you can then recover the bits and pieces and put them back in
place.

Any sufficiently customised system will cause some pain when upgrading.

# And *that* makes me wonder if maybe all the immutable things in /etc
# could be moved elsewhere (/lib or /libdata maybe?)(yes, I know neither
# of these exist right now). Aside from /etc/defaults and /etc/rc.d,
# there's rc.subr, possibly rc.shutdown, and ??? Other things have
# migrated out of /etc (eg, dhclient-script)
#
# Okay, now go ahead and rip these ideas apart ;-)
#
# I agree, btw, that having the update of all this stuff done
# automatically would be nice.  It only takes a 5 minute trip with
# dirdiff to update /etc from the latest sources by hand, but it would
# be nice to not need to remember to do it.

Not to be insulting, Laine, but, excuse me?  "It would be nice not to have
to think."?  Sorry, I really don't mean to offend, but that's exactly
how I read that, above.

It's one thing to drop it into a script or something, cool, but if our
motto is going to equate to the above paraphraseology, I'm afraid we shall
all quite deserve what we get when we reach the end of that road, should
we choose to traverse it.

				--*greywolf;
--
NetBSD: "Progress on your system is closer than it appears."