]> code.ossystems Code Review - openembedded-core.git/commitdiff
lsb: fix lsb_log_msg() implementation
authorCristian Iorga <cristian.iorga@intel.com>
Thu, 27 Mar 2014 07:18:17 +0000 (09:18 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Mar 2014 09:41:16 +0000 (09:41 +0000)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/lsb/lsb/init-functions
meta/recipes-extended/lsb/lsb/lsb_log_message

index e15827ad52de706d7b98d39e411a1f3a47cf8e90..7c1dce24cf6e01acb99bdca7bd8008bd061f3836 100755 (executable)
@@ -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 "$@"
 }
index a716518bdd07a015380629674f1f1e7a923e98ca..10343b081911ea59693a9016acadf0b18fef907e 100755 (executable)
@@ -21,11 +21,6 @@ case "$ACTION" in
        warning "$*"
        echo
        ;;
-  begin)
-       echo -n $*
-       begin "$*"
-       echo
-       ;;
   *)
        ;;
 esac