]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: let status return 0 when proc is running well
authorJesse Zhang <sen.zhang@windriver.com>
Wed, 20 Feb 2013 03:12:02 +0000 (03:12 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 May 2013 19:54:45 +0000 (20:54 +0100)
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@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/initscripts/initscripts-1.0/functions

index 944e3a59b05647e73fdd1bce319fff5e8f008b33..8e15762f8a91fa322fcda703d9467e6062e40f40 100644 (file)
@@ -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