[Pkg-sysvinit-devel] Bug#513237: rc.local not being passed stop or start parameter
Petter Reinholdtsen
pere at hungry.com
Tue Jan 27 18:12:45 UTC 2009
Putting the BTS back on CC.
[John Andrea]
> All other init scripts are designed to start and stop. It has always
> been an obvious step for me. I just symlink it from
> rc[0|6].d/K00local. Been doing it for 12+ years.
Are you talking about /etc/rc.local, or /etc/init.d/rc.local here?
> Is there an equilavent stop script ?
> Some use rc.shutdown or rc.local.shutdown, but why invent another
> file when no other init script is broken into separate pieces.
I would recommend creating a proper init.d script and symlink it
instead of using rc.local. /etc/init.d/rc.local is for backwards
compatibility with systems with /etc/rc.local, and as far as I know,
the features it is supposed to be compatible with only used it at
boot.
> I'm not the only one:
> http://linux.derkeiler.com/Mailing-Lists/Fedora/2007-08/msg00046.html
> http://ubuntuforums.org/showthread.php?t=745209
> etc.
Follow the advice at the end of the ubuntu thread:
You could create a new script in /etc/init.d and then make a symlink
to it in the appropriate /etc/rcx.d directories.
Have a look at the update-rc.d command, which automates this process.
That is the proper way to add code into the boot and shutdown
sequence.
Happy hacking,
--
Petter Reinholdtsen
More information about the Pkg-sysvinit-devel
mailing list