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 <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
16bbb3144c
commit
356ae2563b
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue