Bug#569647: qtsmbstatus-server: Incorrect init.d script dependencies

dEbian Bugs RC

Package: qtsmbstatus-server
Version: 2.1.2-1
Severity: serious
Tags: patch
User: [email protected]
Usertags: incorrect-dependency incorrect-runlevels

With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d scripts of this package, when doing a archive wide
check of the dependencies. These are the errors reported:

error: script qtsmbstatus-server/init.d/qtsmbstatusd depend on
non-existing provides: $samba
error: script qtsmbstatus-server/init.d/qtsmbstatusd have
inconsistent start runlevels: 3 5

The scripts uses files in /usr/ and should depend on $remote_fs, and
used to start after syslog and should probably depend on $syslog to
continue to do so. The qtsmbstatusd script have a bogus dependency on
$samba, which should loose the virtual facility indicator ($). The
runlevels used are not correct for Debian.

This patch should solve the issue, and reinsert the script with the
correct dependencies. Setting severity to serious, as the init.d
script will start to early (before samba) with the current
dependencies.

diff -ruN qtsmbstatus-2.1.2/debian/qtsmbstatus-server.postinst qtsmbstatus-2.1.2-pere/debian/qtsmbstatus-server.postinst


@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# Recover from incorrect init.d script runlevel settings in
+# version 2.1.2-2 and earlier
+if [ "$1" = "configure" ] && dpkg --compare-versions "$2" le "2.1.2-2" ; then
+ update-rc.d -f qtsmbstatusd remove
+fi
+
+#DEBHELPER#
diff -ruN qtsmbstatus-2.1.2/debian/qtsmbstatus-server.qtsmbstatusd.init qtsmbstatus-2.1.2-pere/debian/qtsmbstatus-server.qtsmbstatusd.init


@@ -5,9 +5,9 @@
# For LSB
### BEGIN INIT INFO
# Provides: qtsmbstatusd
-# Required-Start: $samba
-# Required-Stop:
-# Default-Start: 3 5
+# Required-Start: $remote_fs $syslog samba
+# Required-Stop: $remote_fs $syslog
+# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start qtsmbstatusd server at boot time
# Description: QtSmbstatus is a graphical user interface for smbstatus

Happy hacking,