summaryrefslogtreecommitdiff
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2011-08-15 16:26:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-15 15:17:21 +0100
commit4d31193a6969df25bb85a9862b7295e85dcec04b (patch)
tree35011fbee8240e699a052c9d0aab62292d5e71ce /meta/recipes-core/initscripts
parentb5d381133660fe338796b965131cee39cec01b96 (diff)
downloadopenembedded-core-4d31193a6969df25bb85a9862b7295e85dcec04b.tar.gz
openembedded-core-4d31193a6969df25bb85a9862b7295e85dcec04b.tar.bz2
openembedded-core-4d31193a6969df25bb85a9862b7295e85dcec04b.tar.xz
openembedded-core-4d31193a6969df25bb85a9862b7295e85dcec04b.zip
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. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r--meta/recipes-core/initscripts/initscripts-1.0/functions5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/functions b/meta/recipes-core/initscripts/initscripts-1.0/functions
index c1eac3efd..dd7da2b1c 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
}