Package: cfengine2
Version: 2.2.10-5
Severity: normal
Tags: patch

As long as cfengine2 is deactivated in /etc/default/cfengine2,
the message passing is severely disrupting the flow crafted
by log_daemon_msg. Delaying that call until it is known that
some part of cfengine2 is in demand will prettify output.
Patch included.

Best regards,
  Mats Erik Andersson, DM
--- etc/init.d/cfengine2.orig	2012-03-20 21:39:58.000000000 +0000
+++ etc/init.d/cfengine2	2013-08-25 23:44:06.000000000 +0000
@@ -91,11 +91,12 @@
 case "$1" in
     start)
 	RETVAL=0
-	log_daemon_msg "Starting cfengine2"
 	case "$RUN_CFENVD $RUN_CFEXECD $RUN_CFSERVD" in
 	    *1*) ;;
-	    *) exit 0;;
+	    *) log_action_msg "Cfengine2 is disabled in $DEFAULT"
+	       exit 0;;
 	esac
+	log_daemon_msg "Starting cfengine2"
 	if [ "$RUN_CFENVD" = "1" ]; then
 	    ctrl_daemon start "$CFENVD"
 	fi

Reply via email to