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
Stig Telfer 2014-01-24 15:48:32 +00:00 committed by Harald Hoyer
parent abdf191b64
commit 6cc8f694b5
1 changed files with 1 additions and 1 deletions

View File

@ -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