tech-userlevel archive

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

Re: /etc/rc.d/local starts not last



Hello,

On Sun, Apr 14, 2019 at 05:05:56AM +0700, Robert Elz wrote:
>     Date:        Sat, 13 Apr 2019 13:58:55 +0200
>     From:        tlaronde%polynum.com@localhost
>     Message-ID:  <20190413115855.GA1040%polynum.com@localhost>
> 
>   | The question was more: why is it not the very last thing invoked?
> 
> An equally valid question would be why not the first?   Or the last before
> logins are enabled, or ...
> 
> The problem is that no-one (except you) knows what local is supposed
> to do, that's its point.   There is no place in the sequence where it
> can be put where it will work for everyone.
> 
> IMO it would be better to delete it completely, writing an rc.d script
> is not difficult (copyinmg an existing one and changing stuff is even
> easier).   It is only retained because of the long standing convention of
> there being an /etc/rc.local in BSD, as more or less useless as that always
> was.
> 
> Forcing it to be last makes it work for one category of uses, while being
> useless for others.   The same for any other position (but the earlier it
> runs  the more flexible, as what is in rc.local can always just delay
> until something else is ready - whereas I don't know of a way to make
> a late running rc.local force commands to run ahead of others that have
> already completed).
> 
> kre

This is exactly my point with one difference: as the documentation has
implied ("it runs (nearly) last"), I have always thought of rc.local as a
script where to put commands that could be run generally for all or some
users when the boot sequence is finished and the system ready
(typically commands that users will type first and always after logging in).

At least, as implied by the documentation, it should run last.

For whatever depends of the time to be launched, the infrastructure is
rc.d (or whatever directory added to rc_directories) since, as you
write, all the places in the boot sequence are valid ones.

It is definitively not a technical problem: the rc.d structure
allows to solve my problem (as well as others'). It is more a lack of
consistency. rc.local is a convenience for putting miscellaneous
commands system wide when the system is ready (at least that is what the
documentation has always implied for me).

Regards,
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index