Quoting John P. Looney (valen at tuatha.org):
> Problem with that (and I'd a bug filed in RedHat 6.1 or something against
> it) was that rc.local gets run if you do:
>> init 6 (runs rc.local on reboot)
> init s
> init 2 (runs it again)
> init s
> init 2 (runs it again)
>> etc. you get it run many times, with is not the semantics of an rc.local.
Ah, a point. But it sounds easy to fix:
1. Make /etc/init.d/rc.local create a flag file the first time it's run.
2. Make it do nothing if the flag exists.
3. Put something in /etc/rc.boot to delete the flag early each boot-up.
I might be missing something, but that's off the top of my head.
> And it's still a pain. Which is why that simple crontab @reboot is a
> better solution.
Personally, I don't think I should have to look in a crontab to find
startup scripts. But whatever works for you.
--
Cheers, "Don't use Outlook. Outlook is really just a security
Rick Moen hole with a small e-mail client attached to it."
rick at linuxmafia.com -- Brian Trosko in r.a.sf.w.r-j
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!