Blame SOURCES/0099-dracut-lib.sh-bugfix-for-pidof-function.patch

712866
From 2f117f4db3425229f9a9b107682ad05b8ba613ea Mon Sep 17 00:00:00 2001
712866
From: Stig Telfer <stelfer@cray.com>
712866
Date: Fri, 24 Jan 2014 15:48:32 +0000
712866
Subject: [PATCH] dracut-lib.sh: bugfix for pidof function
712866
712866
In follow-up, the patch requires a second mod: kernel tasks have a /proc/.../exe that links to nothing and derails the for loop:
712866
---
712866
 modules.d/99base/dracut-lib.sh | 2 +-
712866
 1 file changed, 1 insertion(+), 1 deletion(-)
712866
712866
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
5c6c2a
index 61e5a81a..d892c26d 100755
712866
--- a/modules.d/99base/dracut-lib.sh
712866
+++ b/modules.d/99base/dracut-lib.sh
712866
@@ -967,7 +967,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
712866
         [ -z "$_cmd" ] && return 1
712866
         _exe=$(type -P "$1")
712866
         for i in /proc/*/exe; do
712866
-            [ -e "$i" ] || return 1
712866
+            [ -e "$i" ] || continue
712866
             if [ -n "$_exe" ]; then
712866
                 [ "$i" -ef "$_exe" ] || continue
712866
             else