dracut-lib.sh: bugfix for pidof function
In follow-up, the patch requires a second mod: kernel tasks have a /proc/.../exe that links to nothing and derails the for loop:master
parent
abdf191b64
commit
6cc8f694b5
|
@ -974,7 +974,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
|
|||
[ -z "$_cmd" ] && return 1
|
||||
_exe=$(type -P "$1")
|
||||
for i in /proc/*/exe; do
|
||||
[ -e "$i" ] || return 1
|
||||
[ -e "$i" ] || continue
|
||||
if [ -n "$_exe" ]; then
|
||||
[ "$i" -ef "$_exe" ] || continue
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue