[Pkg-sysvinit-devel] Bug#538304: update-rc.d: Should reject packages trying to install start and stop symlinks in the same runlevel

Petter Reinholdtsen pere at hungry.com
Thu Sep 10 21:05:05 UTC 2009


I did a test to see how dependency based boot sequencing handle tries
to both enable and disable a service for a given runlevel.  The
disabling take effect, while the enablind is ignored.

Here is the test run.

minerva:/etc/init.d# cat /etc/init.d/test
#! /bin/sh

### BEGIN INIT INFO
# Provides:          test
# Required-Start:    $remote_fs
# Required-Stop:     $remote_fs
# Default-Start:     2 3 4 5
# Default-Stop:      2 3 4 5
# Short-Description: Configure kernel parameters at boottime
# Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
### END INIT INFO


case "$1" in
       start|restart|force-reload)
               ;;
       stop)
               ;;
       *)
               echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2
               exit 3
               ;;
esac
exit 0
minerva:/etc/init.d# update-rc.d test defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: test stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (2 3 4 5)
minerva:/etc/init.d# ls /etc/rc*.d/*test
/etc/rc2.d/K01test  /etc/rc3.d/K01test  /etc/rc4.d/K01test  /etc/rc5.d/K01test
minerva:/etc/init.d#

Happy hacking,
-- 
Petter Reinholdtsen





More information about the Pkg-sysvinit-devel mailing list