I need to add commands that starts every time at system boot.
utisoft at googlemail.com
Mon Jun 8 08:50:05 UTC 2009
2009/6/7 Clifton Royston <cliftonr at lava.net>:
> On Sun, Jun 07, 2009 at 04:12:41PM -0400, Scott Ullrich wrote:
>> On Sun, Jun 7, 2009 at 3:36 PM, Chris Rees<utisoft at googlemail.com> wrote:
>> > 2009/6/7 Clifton Royston <cliftonr at lava.net>:
>> >> If you feel you just *can't* do it via a script in
>> >> /usr/local/etc/rc.d, which is the better way, add a script called
>> >> /etc/rc.local and that will be run after all the other start-up steps.
>> > What's wrong with rc.local?
>> Probably stems from this discussion:
> No, I hadn't actually seen that discussion before.
> I used to work on BSD/OS, which had only the rc.local mechanism, and
> when I first switched over to FreeBSD it was what I used. Eventually I
> got my head around the /etc/rc.d and /usr/local/etc/rc.d mechanism and
> found it distinctly superior, so now I use it almost exclusively.
> Major highlights as to why are:
> * You can readily implement whatever additional operations your service
> should support, such as restart/shutdown/whatever;
> * you can add or remove different services as discrete entities,
> without having to merge their change or removal into a single text
> * the startup/shutdown script can therefore readily be packaged for
> removal/installation together with any other software for the
> service in question;
> * you can get your service or operation run in a specific order
> relative to other services;
> * you can use the same script to start, shutdown, or restart the
> service at another time if appropriate or necessary
> It used to be a little harder to write them than a few lines in
> rc.local, but now sourcing rc_subr provides shell functions which make
> it trivial.
> These days I only use rc.local if I need to do some kind of
> non-critical quick hack, e.g. for troubleshooting a problem.
> -- Clifton
> Clifton Royston -- cliftonr at iandicomputing.com / cliftonr at lava.net
> President - I and I Computing * http://www.iandicomputing.com/
> Custom programming, network design, systems and network consulting services
Nice, thanks a lot, didn't know about rc_subr. Thanks Scott too.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
Q: What is the most annoying thing in a mailing list?
More information about the freebsd-stable