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

712866
From 37a18fda1146ac619165af8dbbbda3cbfb8ad18b Mon Sep 17 00:00:00 2001
712866
From: Stig Telfer <stelfer@cray.com>
712866
Date: Fri, 24 Jan 2014 15:19:11 +0000
712866
Subject: [PATCH] dracut-lib.sh: bugfix for pidof function
712866
712866
It appears there is a simple substitution error in the pidof shell function which causes it to fail to find processes.  In my case, processes started by 95nfs are not terminated in the cleanup hook.  This causes knock-on effects disturbing the root filesystem service dependencies.
712866
712866
Enjoy,
712866
Stig Telfer
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 cd628519..61e5a81a 100755
712866
--- a/modules.d/99base/dracut-lib.sh
712866
+++ b/modules.d/99base/dracut-lib.sh
712866
@@ -969,7 +969,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
712866
         for i in /proc/*/exe; do
712866
             [ -e "$i" ] || return 1
712866
             if [ -n "$_exe" ]; then
712866
-                [ "$i" -ef "$_cmd" ] || continue
712866
+                [ "$i" -ef "$_exe" ] || continue
712866
             else
712866
                 _rl=$(readlink -f "$i");
712866
                 [ "${_rl%/$_cmd}" != "$_rl" ] || continue