]> code.ossystems Code Review - openembedded-core.git/commitdiff
The Skeleton initscript doesn't work on minimal image
authorRobert Yang <liezhi.yang@windriver.com>
Mon, 15 Aug 2011 08:26:55 +0000 (16:26 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Aug 2011 14:17:21 +0000 (15:17 +0100)
Fixes bug [YOCTO #1165]

The /etc/init.d/skeleton doesn't work on minimal image, this is
because of the pidofproc doesn't return "$?" correctly, so store
$? in the variable status would fix it.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
meta/recipes-core/initscripts/initscripts-1.0/functions

index c1eac3efda19dd4b69318feeb59784fc2c82251d..dd7da2b1c3f3d0377582f44ef2a5745b78e61708 100644 (file)
@@ -18,7 +18,8 @@ pidofproc () {
 
        # pidof output null when no program is running, so no "2>/dev/null".
        pid=`pidof $1`
-       case $? in
+       status=$?
+       case $status in
        0)
                echo $pid
                return 0
@@ -28,7 +29,7 @@ pidofproc () {
                exit 127
                ;;
        *)
-               return $?
+               return $status
                ;;
        esac
 }