tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Making powerd=YES default

On Wed, 3 Aug 2011 22:26:31 -0400, Steven Bellovin wrote:
How about this: read defaults/rc.conf *after* reading rc.conf, but use

        : ${varname:=defaultvalue}

to set it.

Nice idea, but how do you deal with all the existing rc.confs which
have the ". /etc/defaults/rc.conf" _first_, rather than _last_?

IMHO that should have been done that way first. But read on.

You could make /etc/defaults.rc.conf empty and put the defaults in
another file, but then how do you get that file included in the legacy

postinstall?  etcupdate?  Let's first figure out where we want to go,
and then figure out how to get there.

Indeed; unfortunately it's problematic to have something working acceptably in postinstall/etcupdate that won't bork up the end-user's /etc/rc.conf. As explained in rc.conf(5), end-user may put whatever he wants inside, and this can lead to complicated parsing/editing.

IMHO postinstall/etcupdate shouldn't push big changes in /etc/rc.conf: risk being either an incorrect /etc/rc.conf which can cripple a boot entirely. Or have something that requires user's intervention to fix and is not as simple as "don't use foo because its obsolete. use bar-YES instead".

With all the potential side affects hiding behind, I am not prepared to make such a paradigmal shift (e.g. moving from defaults overriden by end-user to end-user overriden by defaults in case it's not set).

Jean-Yves Migeon

Home | Main Index | Thread Index | Old Index