[OE-core] [PATCH 8/21] initscripts: let status return 0 when proc is running well

Mark Hatle mark.hatle at windriver.com
Wed May 29 15:09:50 UTC 2013


From: Jesse Zhang <sen.zhang at windriver.com>

Ensure that the status returns 0 instead of the last shell command result,
otherwise the calling script can not properly detect the status of pid.

Signed-off-by: Jesse Zhang <sen.zhang at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 meta/recipes-core/initscripts/initscripts-1.0/functions | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/functions b/meta/recipes-core/initscripts/initscripts-1.0/functions
index 944e3a5..8e15762 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/functions
+++ b/meta/recipes-core/initscripts/initscripts-1.0/functions
@@ -52,6 +52,7 @@ status() {
     pid=`pidofproc $1`
     if [ -n "$pid" ]; then
         echo "$1 (pid $pid) is running..."
+        return 0
     else
         echo "$1 is stopped"
     fi
-- 
1.8.1.2.545.g2f19ada




More information about the Openembedded-core mailing list