[Pkg-xen-devel] Bug#458502: xen-utils-common: Slight problem with LSB header in init.d script
Petter Reinholdtsen
pere at hungry.com
Tue Jan 1 09:44:52 UTC 2008
Package: xen-utils-common
Version: 3.0+hg11292-2
Tags: patch
User: initscripts-ng-devel at lists.alioth.debian.org
Usertags: incorrect-dependency
When testing dependency based boot sequencing, I discovered a bug in
the init.d script for xen-utils-common. It is set to stop in the boot
"runlevel" (S), but no script should stop there. Also, xend only
depend on $local_fs, but uses files in /usr/ which is not guaranteed
to be available until after $remote_fs. Last, the xendomains script
have the home-made header default-enabled which create a lintian
warning and was the issue that make me have a closer look at these
scripts dependencies.
This patch solve the issues:
diff -ur xen-common-3.1.0.orig/debian/xen-utils-common.xend.init xen-common-3.1.0/debian/xen-utils-common.xend.init
--- xen-common-3.1.0.orig/debian/xen-utils-common.xend.init 2008-01-01 10:34:58.000000000 +0100
+++ xen-common-3.1.0/debian/xen-utils-common.xend.init 2008-01-01 10:36:54.000000000 +0100
@@ -1,10 +1,10 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: xend
-# Required-Start: $local_fs
-# Required-Stop: $local_fs
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
-# Default-Stop: S 0 1 6
+# Default-Stop: 0 1 6
# Short-Description: XEN control daemon
# Description: XEN control daemon
### END INIT INFO
Only in xen-common-3.1.0/debian: xen-utils-common.xend.init.~1~
diff -ur xen-common-3.1.0.orig/debian/xen-utils-common.xendomains.init xen-common-3.1.0/debian/xen-utils-common.xendomains.init
--- xen-common-3.1.0.orig/debian/xen-utils-common.xendomains.init 2008-01-01 10:34:58.000000000 +0100
+++ xen-common-3.1.0/debian/xen-utils-common.xendomains.init 2008-01-01 10:36:12.000000000 +0100
@@ -6,12 +6,12 @@
# Required-Stop: $syslog $remote_fs xend
# Should-Stop:
# Default-Start: 2 3 4 5
-# Default-Stop: S 0 1 6
-# Default-Enabled: yes
+# Default-Stop: 0 1 6
# Short-Description: Start/stop secondary xen domains
# Description: Start / stop domains automatically when domain 0
# boots / shuts down.
### END INIT INFO
+# Default-Enabled: yes
PATH=/usr/lib/xen-common/bin:/sbin:/bin:/usr/sbin:/usr/bin
VERSION=$(xen-utils-version -q 2>/dev/null || true)
As the stop xend script do not seem to do anything except killing the
daemon, that task might be better left to the sendsigs script in
runlevel 0 and 6. If this is indeed the case, I recommend removing 0
and 6 from the Default-Stop list to speed up the shutdown.
Happy hacking,
--
Petter Reinholdtsen
More information about the Pkg-xen-devel
mailing list