Package:  nbd-client nbd-server
Version:  1:2.9.9-1
Severity: important
Tags:     patch
User:     [EMAIL PROTECTED]
Usertags: incorrect-dependency

When testing dependency based boot sequencing, I discovered a bug in
the init.d script for nbd-client.  While I was at it, I also checked
the script for nbd-server.

nbd-client claim that it need to start before $remote_fs, and this
creates a dependency loop in the init.d script dependency graph.  It
is obviously a mistake, as the remote file systems are started in the
boot "runlevel" (rcS.d), while nbd-client is started in runlevel 2-5
later in the boot, and thus can not be started before /usr/ is
guaranteed to be mounted.  Because of this, I suggest the header
X-Start-Before is removed.

I assume nbd-client need a read-write / to mount file systems, and
added $local_fs as a dependency because of this.  I reduced $network
to a optional dependency, as I assume it can run also without a
network like nbd-server was set to do.  If this is wrong, $network
should be moved from should-* to required-*.

nbd-server was set to stop in the boot "runlevel".  That is
impossible, so S is removed from default-stop.  It depended on both
$local_fs and $remote_fs.  That is not needed, as $remote_fs already
depend on $local_fs.

I'm setting severity to important as this issue make it impossible to
install nbd-client when dependency based boot sequencing is enabled.

This patch implement the change:

diff -ur nbd-2.9.9.orig/debian/nbd-client.init.d 
nbd-2.9.9/debian/nbd-client.init.d
--- nbd-2.9.9.orig/debian/nbd-client.init.d     2008-01-03 09:00:21.000000000 
+0100
+++ nbd-2.9.9/debian/nbd-client.init.d  2008-01-03 09:03:01.000000000 +0100
@@ -16,11 +16,12 @@
 #
 ### BEGIN INIT INFO
 # Provides: nbd-client
-# Required-Start: $network
-# Required-Stop: $network
+# Required-Start: $local_fs
+# Required-Stop: $remote_fs
+# Should-Start: $network
+# Should-Stop: $network
 # Default-Start: 2 3 4 5
 # Default-Stop: 0 1 6
-# X-Start-Before: $remote_fs
 # Short-Description: Network Block Device client
 ### END INIT INFO
 #
diff -ur nbd-2.9.9.orig/debian/nbd-server.init.d 
nbd-2.9.9/debian/nbd-server.init.d
--- nbd-2.9.9.orig/debian/nbd-server.init.d     2008-01-03 09:00:21.000000000 
+0100
+++ nbd-2.9.9/debian/nbd-server.init.d  2008-01-03 09:01:32.000000000 +0100
@@ -14,12 +14,12 @@
 #
 ### BEGIN INIT INFO
 # Provides: nbd-server
-# Required-Start: $local_fs $remote_fs
-# Required-Stop: $local_fs $remote_fs
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
 # Should-Start: $network
 # Should-Stop: $network
 # Default-Start: 2 3 4 5
-# Default-Stop: S 0 1 6
+# Default-Stop: 0 1 6
 # Short-Description: Network Block Device server
 ### END INIT INFO

Happy hacking,
--
Petter Reinholdtsen



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to