Quoting John P. Looney (valen at tuatha.org):
> True. One of my personal hates with debian is that it doesn't have a
> simple rc.local file that you can put stuff like this in.
I wax hot and cold on this, myself. Some days, it just annoys the heck
out of me. But:
> Apparently  putting the following in root's crontab is a way of doing it;
> @reboot /etc/rc.local
>> But that's crappy that you have to go to such lengths. Of course, as
> someone who was a skilled slackware user, I'm sure you would have been
> able to sort it out.
I believe the Debian Gods-Approved Solution[tm] is to
# cd /etc/init.d
# cp skeleton foo
# $EDITOR_OF_CHOICE foo
And, when you're done, do the symlink stuff in /etc/rc?.d/ as required.
If you're basically a BSD/Slackware/Stampede person, the above drill can
be one SysVInit-ism too many -- but the compensating advantage is that
you get proper handling of lock files, proper start|stop|restart
directives, and all that. Arguably, just slapping something onto the
end of rc.local is half-assed.
But if you want such a half-assed rc.local _anyway_ (and some days, I do),
it suffices to do:
# cd /etc/init.d
# $EDITOR_OF_CHOICE rc.local
# chmod 774 rc.local
# ln -s /etc/init.d/rc.local /etc/rc2.d/S99local
And you're done.
Cheers, Chaos, panic, & disorder - my work here is done.
rick at linuxmafia.com
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!