Code

collectd-core.collectd.init.d: Use the exit codes specified by LSB in status.
authorSebastian Harl <sh@tokkee.org>
Thu, 17 May 2012 15:34:02 +0000 (17:34 +0200)
committerSebastian Harl <sh@tokkee.org>
Thu, 17 May 2012 15:34:02 +0000 (17:34 +0200)
Thanks to Michael Prokop for reporting this.

Closes: #615840
debian/changelog
debian/collectd-core.collectd.init.d

index dce6b38a48bcf26cfabf16104ac911d07990c7ba..9ce9473fa2d03f8791747110d717ac32947d406d 100644 (file)
@@ -31,6 +31,8 @@ collectd (4.10.7-1) unstable; urgency=low
     - Added cpufrequtils to should-start, else collectd does not reliably
       detect all CPUs; thanks to Mathias Bauer for reporting and debugging
       this (Closes: #662040).
+    - Use the exit codes specified by LSB in 'status' command; thanks to
+      Michael Prokop for reporting this (Closes: #615840).
 
  -- Sebastian Harl <tokkee@debian.org>  Thu, 17 May 2012 15:55:39 +0200
 
index 5771380d0594c1d96adb0c04cda8b4e74846fa03..65d1f8d0beb7afa2aacc0e881978dfd168819ae8 100755 (executable)
@@ -142,10 +142,16 @@ d_status() {
                        echo "collectd ($PID) is running."
                        exit 0
                else
+                       if test -f "$_PIDFILE"; then
+                               echo "collectd is stopped but PID file exists."
+                               exit 1
+                       fi
                        echo "collectd is stopped."
+                       exit 3
                fi
        fi
-       exit 1
+       echo "status of collectd unknown."
+       exit 4
 }
 
 case "$1" in