Bug#542169: clvm: Incorrect provides, runlevels and dependencies in init.d script

Petter Reinholdtsen pere at hungry.com
Tue Aug 18 08:15:37 UTC 2009


Package:  clvm
Version:  2.02.39-3
Severity: important
Tags:     patch
User:     initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-provides incorrect-dependency

With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d script.  The provides should be the name of the
script and not a sentence.  The script should start after /usr/ is
mounted, and because of this should depend on $remote_fs.  The
update-rc.d call start the script in rcS.d and stops it in runlevels 0
and 6, while the header do not match this.

<URL: http://refspecs.freestandards.org/LSB_2.1.0/LSB-generic/LSB-generic/initscrcomconv.html >
documents the LSB header format.  Some debian notes are available from
<URL: http://wiki.debian.org/LSBInitScripts >.

This patch should solve the issue.  Without it, the script will fail
to install if another broken script providing the same words already
is installed, and will be activated in the wrong runlevels if it is
able to install.

diff -ur lvm2-2.02.44/debian/clvm.init lvm2-2.02.44-pere/debian/clvm.init
--- lvm2-2.02.44/debian/clvm.init       2009-08-18 10:06:01.000000000 +0200
+++ lvm2-2.02.44-pere/debian/clvm.init  2009-08-18 10:11:47.000000000 +0200
@@ -1,11 +1,11 @@
 #!/bin/sh
 #
 ### BEGIN INIT INFO
-# Provides:          lvm cluster locking daemon
-# Required-Start:    lvm2 cman
-# Required-Stop:     lvm2 cman
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
+# Provides:          clvm
+# Required-Start:    $remote_fs lvm2 cman
+# Required-Stop:     $remote_fs lvm2 cman
+# Default-Start:     S
+# Default-Stop:      0 6
 # Short-Description: start and stop the lvm cluster locking daemon
 ### END INIT INFO
 #

Happy hacking,
-- 
Petter Reinholdtsen





More information about the pkg-lvm-maintainers mailing list