Patchwork [1/1] lsb: fix lsb_log_msg() implementation

login
register
mail settings
Submitter Cristian Iorga
Date March 27, 2014, 7:18 a.m.
Message ID <c0db7dda21301aa17eb2b36cfe1a343664d163e0.1395904656.git.cristian.iorga@intel.com>
Download mbox | patch
Permalink /patch/69367/
State New
Headers show

Comments

Cristian Iorga - March 27, 2014, 7:18 a.m.
LSB lsb_log_message calls a begin()
function that should be implemented
in /etc/init.d/functions.
The aforementioned script does not
implement the begin() function, as
such there is a small issue related to logging.

This fix implements a local version of
the function, while cleaning up the
troublesome previous implementation.

Fix [YOCTO #5795]

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 meta/recipes-extended/lsb/lsb/init-functions  | 7 ++++++-
 meta/recipes-extended/lsb/lsb/lsb_log_message | 5 -----
 2 files changed, 6 insertions(+), 6 deletions(-)

Patch

diff --git a/meta/recipes-extended/lsb/lsb/init-functions b/meta/recipes-extended/lsb/lsb/init-functions
index e15827a..7c1dce2 100755
--- a/meta/recipes-extended/lsb/lsb/init-functions
+++ b/meta/recipes-extended/lsb/lsb/init-functions
@@ -30,10 +30,15 @@  log_warning_msg () {
 	/etc/core-lsb/lsb_log_message warning "$@"
 }
 
+# int log_begin_message (char *message)
 log_begin_msg () {
-	/etc/core-lsb/lsb_log_message begin "$@"
+	if [ -z "$1" ]; then
+		return 1
+	fi
+	echo " * $@"
 }
 
+
 log_end_msg () {
 	/etc/core-lsb/lsb_log_message end "$@"
 }
diff --git a/meta/recipes-extended/lsb/lsb/lsb_log_message b/meta/recipes-extended/lsb/lsb/lsb_log_message
index a716518..10343b0 100755
--- a/meta/recipes-extended/lsb/lsb/lsb_log_message
+++ b/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -21,11 +21,6 @@  case "$ACTION" in
 	warning "$*"
 	echo
 	;;
-  begin)
-  	echo -n $*
-	begin "$*"
-	echo
-	;;
   *)
   	;;
 esac