[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 6:38 PM, Michael van Elst
> jmmv%NetBSD.org@localhost (Julio Merino) writes:
>>You can change anything you like locally; that's why you have the
> So, whoever needs to configure the startup beyond what is provided
> by rc.conf must build everything by himself?
Uh, huh? I said nowhere that you should not be able to configure the
startup of your system. That's why you have rc.conf, why you can drop
additional scripts in /etc/rc and why you can modify /etc/rc.local.
The whole point of what I am saying is that you should not need to
modify the provided scripts: any custom modifications you want to
perform should be doable in files specially designed for that purpose
(rc.local and any new files you create).
For anything out of the ordinary, yes, you should be rebuilding the
system, just as you would to modify any other part of the system.
Following your argument, /usr/sbin/audit-packages and
/usr/sbin/etcupdate should really be in /etc/ because... well, they
are scripts and people may want to modify them... but I think we'll
agree that this makes no sense.
>>By legitimate I meant: is it there any technical reason to allow
>>modifying these files *as configuration* instead of from the source
>>tree, other than "just because I want to"? They are code.
> The existence of rc.local should show you that rc files are not
> just code. In particular, many rc files just assign a few variables
> and delegate the 'code' to a library.
The point of rc.local is to allow you to provide anything not
contemplated by the standard scripts. 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
> 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.
Julio Merino / @jmmv
Main Index |
Thread Index |