From: Robert Yang Date: Mon, 15 Aug 2011 08:26:55 +0000 (+0800) Subject: The Skeleton initscript doesn't work on minimal image X-Git-Tag: rev_ivi_2015_02_04~20797 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e45c3fe9c8ee209bc913f08d27a0c1f68c00b094;p=scm%2Fbb%2Ftizen-distro.git The Skeleton initscript doesn't work on minimal image 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. (From OE-Core rev: 4d31193a6969df25bb85a9862b7295e85dcec04b) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/initscripts/initscripts-1.0/functions b/meta/recipes-core/initscripts/initscripts-1.0/functions index c1eac3e..dd7da2b 100644 --- a/meta/recipes-core/initscripts/initscripts-1.0/functions +++ b/meta/recipes-core/initscripts/initscripts-1.0/functions @@ -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 }