diff options
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/functions | 5 |
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 c1eac3efda..dd7da2b1c3 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 } |