Getting a script to run at boot

Jay Banks jay.quest4 at gmail.com
Sun Oct 7 08:44:01 PDT 2007


> Well, that's the problem then. The '--daemon' switch is misleading. You
> should get it to work as expected by adding a '&' at the end of the

Took me a little while to get that to work, but I finally got it.

> command-line. Just for kicks I installed it on my system and with
> the attached script and the following in my /etc/rc.conf it seems to
> work as expected (though I haven't tried running it on startup):

It did seem to work. 

I would be interested to know if yours ran on a reboot, because
mine didn't.

Since it did seem to work like a daemon, though, and worked
from my terminal session (but still not on reboot), I got the bright
idea of running it from a cron job again, where I once again got the
error that fping wasn't found. So I copied fping to 
/sbin (cp /usr/local/sbin/fping /sbin) and sntop just started
to work. So I tried it on reboot again, and it is actually running after
a reboot.

Hallelujah. A whole weekend taken up just to get a script to run
on a reboot. Good thing I don't have a life! 

I really appreciate the help. I couldn't have done it without you.
I'm the kind of guy that really does try to figure it out on my
own before asking for help, but I wouldn't have figured out that
"&" thing at all.


Jay Banks




More information about the freebsd-rc mailing list