[oe-commits] Richard Tollerton : bootlogd: Honor VERBOSE

git at git.openembedded.org git at git.openembedded.org
Mon Jul 21 18:25:15 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: d354bc38a3081be7710203816db4bcfe2952ef8c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d354bc38a3081be7710203816db4bcfe2952ef8c

Author: Richard Tollerton <rich.tollerton at ni.com>
Date:   Mon Jul 21 10:50:54 2014 -0500

bootlogd: Honor VERBOSE

The messages echoed when starting and stopping bootlogd 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 at ni.com>
Signed-off-by: Ben Shelton <ben.shelton at ni.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-core/sysvinit/sysvinit/bootlogd.init | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
index 7d6518d..06af465 100755
--- a/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
+++ b/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
@@ -46,7 +46,7 @@ esac
 
 case "$ACTION" in
 	start)
-		echo -n "Starting $DESC: "
+		[ "${VERBOSE}" != "no" ] && echo -n "Starting $DESC: "
 		if [ -d /proc/1/. ]
 		then
 			umask 027
@@ -55,10 +55,12 @@ case "$ACTION" in
 		else
 			$DAEMON -r -c
 		fi
-		echo "$NAME."
+		[ "${VERBOSE}" != "no" ] && echo "$NAME."
 		;;
 	stop)
-		echo -n "Stopping $DESC: "
+		# stop may get called during bootup, so let it honor
+		# rcS VERBOSE setting
+		[ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
 		start-stop-daemon --stop --quiet --exec $DAEMON
 
 		if [ "$STOPPER" ] && [ -f /var/log/boot ] && \
@@ -71,7 +73,7 @@ case "$ACTION" in
 			mv boot~ boot.0
 		fi
 
-		echo "$NAME."
+		[ "${VERBOSE}" != "no" ] && echo "$NAME."
 		;;
 	 restart|force-reload)
 		echo -n "Restarting $DESC: "



More information about the Openembedded-commits mailing list