[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#541876: rgpsp: Incorrect runlevels and dependencies in init.d script



Package:  rgpsp
Version:  1.1.0-4
Severity: important
Tags:     patch
User:     initscripts-ng-devel@lists.alioth.debian.org
Usertags: incorrect-runlevels incorrect-dependency

With dependency based boot sequencing, I discovered what I believe is
a bug in the init.d script.  The list of runlevels in the init.d
header do not match the arguments used by update-rc.d.  Also, it uses
files in /usr/ but do not depend on $remote_fs.  Next, it depend on
networking instead of the more correct virtual facility $network, and
uses syslog without depending on $syslog.  Finally, its stop action
only kills the daemon, and this is normally better left to sendsigs
during halt and reboot, to speed up shutdown.

<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 service will start
to early in the boot, and might fail to start because /usr/ isn't
mounted yet.

diff -ur gps-1.1.0.0/debian/rgpsp.init gps-1.1.0.0-pere/debian/rgpsp.init
--- gps-1.1.0.0/debian/rgpsp.init       2009-08-16 22:03:39.000000000 +0200
+++ gps-1.1.0.0-pere/debian/rgpsp.init  2009-08-16 22:05:03.000000000 +0200
@@ -2,11 +2,10 @@

 ### BEGIN INIT INFO
 # Provides:          rgpsp
-# Required-Start:    networking
-# Required-Stop:
-# Should-Start:
-# Default-Start:     S 2 3 4 5
-# Default-Stop:      0 6
+# Required-Start:    $remote_fs $network $syslog
+# Required-Stop:     $remote_fs $network $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      1
 # Short-Description: Provides Process Statistics on a TCP port
 ### END INIT INFO


Happy hacking,
--
Petter Reinholdtsen



Reply to: