[Pkg-sysvinit-devel] Bug#667464: /usr/sbin/update-rc.d: update-rc.d ignores sequence number parameter
Roger Leigh
rleigh at codelibre.net
Wed Apr 4 09:54:58 UTC 2012
On Wed, Apr 04, 2012 at 11:34:25AM +0200, josh wrote:
> For example, I've written an init.d script that I want to
> start before another service gets started. I want it to have the start
> index 20. It also should not be stopped before certain other
> services are stopped, so I want it to have a stop index of
> 02. However:
> update-rc.d: using dependency based boot sequencing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nowadays, the numbers are not used on most systems. We
order the scripts using dependency information in the script
header.
For example, this is the header from /etc/init.d/postfix:
### BEGIN INIT INFO
# Provides: postfix mail-transport-agent
# Required-Start: $local_fs $remote_fs $syslog $named $network $time
# Required-Stop: $local_fs $remote_fs $syslog $named $network
# Should-Start: postgresql mysql clamav-daemon postgrey spamassassin
# Should-Stop: postgresql mysql clamav-daemon postgrey spamassassin
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop the Postfix Mail Transport Agent
# Description: postfix is a Mail Transport agent
### END INIT INFO
If you add similar information to your script, it should do
the right thing. Rather than using numbers, explicitly state
which services you need, and it will end up in the correct
order.
Regards,
Roger
--
.''`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' schroot and sbuild http://alioth.debian.org/projects/buildd-tools
`- GPG Public Key F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800
More information about the Pkg-sysvinit-devel
mailing list