Package: sysstat
Version: 9.0.1-1
Severity: wishlist
Tags: patch

Here is a patch to support the "status" action in the init script.  It's a bit 
of an unorthodox solution given the special nature of what the script does, 
but I think it's useful and within the spirit of LSB, stating whether the 
service in question is active or not.
diff -u sysstat-9.0.1/debian/sysstat.init.d sysstat-9.0.1/debian/sysstat.init.d
--- sysstat-9.0.1/debian/sysstat.init.d
+++ sysstat-9.0.1/debian/sysstat.init.d
@@ -45,9 +45,17 @@
         ;;
   stop)
         ;;
-
+  status)
+        if [ "$ENABLED" = "true" ] ; then
+                log_success_msg "sadc cron jobs are enabled"
+                exit 0
+        else
+                log_failure_msg "sadc cron jobs are disabled"
+                exit 3
+        fi
+        ;;
   *)
-        log_failure_msg "Usage: $0 {start|stop|restart|reload|force-reload}"
+        log_failure_msg "Usage: $0 {start|stop|restart|reload|force-reload|status}"
         exit 1
         ;;
 esac

Reply via email to