summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
}