Package:  elida
Version:  0.2
Severity: important
User:     [email protected]
Usertags: incorrect-dependency

I came across this issue when checking the init.d script dependencies
in the entire archive.  The script uses files in /usr/ and need to
depend on $remote_fs to make sure /usr/ is available if it is mounted
over NFS.

I further noticed that the script is started from rcS.d/, and start a
daemon.  This is not recommended, and I fail to see why this script
need to be enabled in single user mode.  Why is it started from
rcS.d/?  If this is a mistake, I recommend changing the call to
update-rc.d and the header to not start in rcS.d/.  The dependency on
$named do not make sense if the script should start from rcS.d/, as
the $named service is started in runlevels 2-5.

<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 >.

Here is a patch to fix the missing dependency.  Please object if we
should not NMU to fix this.

diff -ur ../elida-0.4/elida.init.d ../elida-0.4-pere/elida.init.d
--- ../elida-0.4/elida.init.d   2008-03-09 00:57:34.000000000 +0100
+++ ../elida-0.4-pere/elida.init.d      2009-09-29 11:31:07.000000000 +0200
@@ -4,8 +4,8 @@

 ### BEGIN INIT INFO
 # Provides:          elida
-# Required-Start:    $network
-# Required-Stop:     $network
+# Required-Start:    $network $remote_fs
+# Required-Stop:     $network $remote_fs
 # Should-Start:      $named
 # Should-Stop:       $named
 # Default-Start:     S 2 3 4 5


If the runlevel settings should be changed, this patch should to the
trick.  The script used to start before syslog, and should probably
depend on $syslog too.

diff -ur ../elida-0.4/debian/postinst ../elida-0.4-pere/debian/postinst
--- ../elida-0.4/debian/postinst        2009-07-05 05:13:01.000000000 +0200
+++ ../elida-0.4-pere/debian/postinst   2009-09-29 11:40:01.000000000 +0200
@@ -3,8 +3,14 @@

 . /usr/share/debconf/confmodule

+# Recover from incorrect init.d script runlevel settings in
+# version 0.4 and earlier
+if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "0.4" ; then
+    update-rc.d -f elida remove
+fi
+
 if [ "$1" = "configure" ]; then
-    update-rc.d elida start 20 2 3 4 5 . stop 20 0 1 6 . start 44 S . 
>/dev/null
+    update-rc.d elida start 20 2 3 4 5 . stop 20 0 1 6 . >/dev/null
 #   if [ ! -d /usr/src/elida ]; then
 #       mkdir /usr/src/elida
 #       chmod 2775 /usr/src/elida
diff -ur ../elida-0.4/elida.init.d ../elida-0.4-pere/elida.init.d
--- ../elida-0.4/elida.init.d   2008-03-09 00:57:34.000000000 +0100
+++ ../elida-0.4-pere/elida.init.d      2009-09-29 11:37:40.000000000 +0200
@@ -8,7 +8,7 @@
 # Required-Stop:     $network
 # Should-Start:      $named
 # Should-Stop:       $named
-# Default-Start:     S 2 3 4 5
+# Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
 # Short-Description: pbuilder mail interface
 # Description:       elida accepts commands from email messages from


Happy hacking,
-- 
Petter Reinholdtsen



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

Reply via email to