From: Sebastian Harl Date: Thu, 17 May 2012 15:34:02 +0000 (+0200) Subject: collectd-core.collectd.init.d: Use the exit codes specified by LSB in status. X-Git-Tag: collectd-4.10.7-1~13 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=eabafa9e8cbe2ab604019ab7f065f5f85d4e3ee2;p=pkg-collectd.git collectd-core.collectd.init.d: Use the exit codes specified by LSB in status. Thanks to Michael Prokop for reporting this. Closes: #615840 --- diff --git a/debian/changelog b/debian/changelog index dce6b38..9ce9473 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 17 May 2012 15:55:39 +0200 diff --git a/debian/collectd-core.collectd.init.d b/debian/collectd-core.collectd.init.d index 5771380..65d1f8d 100755 --- a/debian/collectd-core.collectd.init.d +++ b/debian/collectd-core.collectd.init.d @@ -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