dracut-lib.sh: fixed return value of pidof()
pidof always returned with 0, so any "while pidof" loop would not
terminate.
Thanks "Consus" for the hint!
(cherry picked from commit 4e58a1ffc7)
parent
0506080aee
commit
e5f6899a55
|
|
@ -962,6 +962,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
|
|||
local _cmd
|
||||
local _exe
|
||||
local _rl
|
||||
local _ret=1
|
||||
local i
|
||||
_cmd="$1"
|
||||
[ -z "$_cmd" ] && return 1
|
||||
|
|
@ -976,8 +977,9 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
|
|||
fi
|
||||
i=${i%/exe}
|
||||
echo ${i##/proc/}
|
||||
_ret=0
|
||||
done
|
||||
return 0
|
||||
return $_ret
|
||||
}
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue