Date: Mon, 8 Jun 2009 09:49:42 +0100 From: Chris Rees <utisoft@googlemail.com> To: Scott Ullrich <sullrich@gmail.com>, utisoft@gmail.com, AES <allnetgroup@yahoo.com>, freebsd-stable@freebsd.org Subject: Re: I need to add commands that starts every time at system boot. Message-ID: <b79ecaef0906080149o6ae23b12qe25d8d46824cab9d@mail.gmail.com> In-Reply-To: <20090607222110.GA18662@lava.net> References: <143776.42704.qm@web34307.mail.mud.yahoo.com> <20090607183035.GA22240@lava.net> <b79ecaef0906071236g3cc29114k37e4daa8206157f3@mail.gmail.com> <d5992baf0906071312o60926fb5k837adae68dca0866@mail.gmail.com> <20090607222110.GA18662@lava.net>
next in thread | previous in thread | raw e-mail | index | archive | help
2009/6/7 Clifton Royston <cliftonr@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@googlemail.com> wrote= : >> > 2009/6/7 Clifton Royston <cliftonr@lava.net>: >> > >> >>=A0If 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: >> http://lists.freebsd.org/pipermail/freebsd-stable/2007-July/035996.html > > =A0No, I hadn't actually seen that discussion before. > > =A0I 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. =A0Eventually 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. > > =A0Major highlights as to why are: > > =A0* You can readily implement whatever additional operations your servic= e > =A0 should support, such as restart/shutdown/whatever; > =A0* you can add or remove different services as discrete entities, > =A0 without having to merge their change or removal into a single text > =A0 file; > =A0* the startup/shutdown script can therefore readily be packaged for > =A0 removal/installation together with any other software for the > =A0 service in question; > =A0* you can get your service or operation run in a specific order > =A0 relative to other services; > =A0* you can use the same script to start, shutdown, or restart the > =A0 service at another time if appropriate or necessary > > =A0It 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. > > =A0These days I only use rc.local if I need to do some kind of > non-critical quick hack, e.g. for troubleshooting a problem. > =A0-- Clifton > > -- > =A0 =A0Clifton Royston =A0-- =A0cliftonr@iandicomputing.com / cliftonr@la= va.net > =A0 =A0 =A0 President =A0- I and I Computing * http://www.iandicomputing.= com/ > =A0Custom programming, network design, systems and network consulting ser= vices > Nice, thanks a lot, didn't know about rc_subr. Thanks Scott too. Chris --=20 A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in a mailing list?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b79ecaef0906080149o6ae23b12qe25d8d46824cab9d>