View Single Post

   
  #10 (permalink)  
Old 02-20-2008, 07:29 AM
Keith Keller
 
Posts: n/a
Default Re: startup script enigma

On 2005-04-06, gregg <greggNOSPAMarbage@NOSPAMfree.WANTEDfr> wrote:
>
> Er, what if the script is not in rc.M yet (just like cpufreqd).


Then add it, or add it to rc.local.

> I find the FreeBSD way just more consistent (chmod'ing a script in
> /usr/local/etc/rc.d/ for instance make it launched at boot. Of course,
> here postfix and cpufreqd aren't in /usr/local... grrr, what a mess)


You could certainly emulate this by adding these modifications to rc.M
or rc.local, as well.

> I wonder what's more simple and elegant, here ?
> Adding things to rc.M by myself (making me not to forget to check every
> time I upgrade) or finding a way to let it be done automagically by
> _simply_ chmod'ing (and I mean just that, simply chmod'ing without
> adding 3 lines of "if [ -x soandso ]" etc...), using a loop somewhere...


I personally prefer using rc.local to call software I've installed
myself. It solves the upgrade issue (as long as you save your old
rc.local), and is simple enough. rc.local doesn't even need to call a
shell script: for example, I call dhcpd straight out of rc.local,
without an intervening shell script (or any other file tests, for that
matter). If it breaks, the worst that happens is that I have no DHCP
server, or, if I don't want one, maybe I get an error on boot, but
that's it.

--keith

--
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom
see X- headers for PGP signature information

Reply With Quote