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>
# 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
exit 127
;;
*)
- return $?
+ return $status
;;
esac
}