Patchwork [meta-oe,v2] syslog-ng: Improved initscript VERBOSE handling.

login
register
mail settings
Submitter Ben Shelton
Date July 23, 2014, 10:09 p.m.
Message ID <1406153388-17978-1-git-send-email-ben.shelton@ni.com>
Download mbox | patch
Permalink /patch/76507/
State Accepted, archived
Headers show

Comments

Ben Shelton - July 23, 2014, 10:09 p.m.
From: Richard Tollerton <rich.tollerton@ni.com>

The messages echoed when starting and stopping syslog-ng are currently
printed regardless of the setting of VERBOSE.  Adjust the initscript so
they're only printed when VERBOSE is enabled.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
---
NOTE: This patch is meant to apply on top of Richard Purdie's commit 
'syslog-ng: Various fixes' in master/next.  The other patches from the 
original submission are no longer relevant after the uprev.

 meta-oe/recipes-support/syslog-ng/files/initscript | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/meta-oe/recipes-support/syslog-ng/files/initscript b/meta-oe/recipes-support/syslog-ng/files/initscript
index 0772cc2..910030f 100644
--- a/meta-oe/recipes-support/syslog-ng/files/initscript
+++ b/meta-oe/recipes-support/syslog-ng/files/initscript
@@ -22,15 +22,15 @@  RETVAL=0
 
 case "$1" in
   start)
-    echo -n "Starting syslog-ng:"
+    [ "${VERBOSE}" != "no" ] && echo -n "Starting syslog-ng:"
     create_xconsole
     start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $syslog_ng
-    echo "."
+    [ "${VERBOSE}" != "no" ] && echo "."
     ;;
   stop)
-    echo -n "Stopping syslog-ng:"
+    [ "${VERBOSE}" != "no" ] && echo -n "Stopping syslog-ng:"
     start-stop-daemon --stop --quiet --pidfile $PIDFILE
-    echo "."
+    [ "${VERBOSE}" != "no" ] && echo "."
     ;;
   reload|force-reload)
     start-stop-daemon --stop --quiet --signal 1 --exec $syslog_ng