tech-userlevel archive

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

Re: Moving rc.d scripts to base.tgz



On Sat, Apr 16, 2011 at 07:01:09PM +0100, Julio Merino wrote:

> The point of rc.local is to allow you to provide anything not
> contemplated by the standard scripts.

Ask yourself what the point of rc files is...

> The standard scripts are
> modular for a reason: to allow you to select which ones you want and
> to allow configuring them by configuration files.  If you ever have to
> modify the code of such scripts, something has gone wrong in this
> approach.

So far the scripts were considered modifiable. Declaring them off limits
is something you try to introduce.


> > Saying this, modifying the scripts without modifying the files
> > themselves is possible since rc.conf.d, the shell will not only
> > overlay new variable assignments but also functions that implement
> > the start/stop actions. It is slightly more limited but I prefer
> > this method so that I don't have to merge changes with every update.
> 
> There, you just reinforce my point.  Stick whatever you need in
> rc.conf.d and leave the canonical versions in rc.d alone so that you
> don't have to suffer pain while upgrading.

Every upgrade is more or less painful, nothing comes free.

Before rc.conf.d there was no such option. If the scripts weren't
that modular, there were no such option. If the scripts were binaries
as you suggested, there were no such option. Still, the scripts
were modifiable, were part of etc.tar.gz and upgrades were supported
by etcupdate to reduce the pain.

That we now can live with non-modifiable rc scripts is the consequence
of such design decisions and not because rc scripts are on the same
level as /bin/ls. And the existence of rc.conf.d where you can
augment or even overload the standard scripts exactly proves that point.


Greetings,
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index