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

18971c
From 37a18fda1146ac619165af8dbbbda3cbfb8ad18b Mon Sep 17 00:00:00 2001
18971c
From: Stig Telfer <stelfer@cray.com>
18971c
Date: Fri, 24 Jan 2014 15:19:11 +0000
18971c
Subject: [PATCH] dracut-lib.sh: bugfix for pidof function
18971c
18971c
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.
18971c
18971c
Enjoy,
18971c
Stig Telfer
18971c
---
18971c
 modules.d/99base/dracut-lib.sh | 2 +-
18971c
 1 file changed, 1 insertion(+), 1 deletion(-)
18971c
18971c
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
18971c
index cd628519..61e5a81a 100755
18971c
--- a/modules.d/99base/dracut-lib.sh
18971c
+++ b/modules.d/99base/dracut-lib.sh
18971c
@@ -969,7 +969,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
18971c
         for i in /proc/*/exe; do
18971c
             [ -e "$i" ] || return 1
18971c
             if [ -n "$_exe" ]; then
18971c
-                [ "$i" -ef "$_cmd" ] || continue
18971c
+                [ "$i" -ef "$_exe" ] || continue
18971c
             else
18971c
                 _rl=$(readlink -f "$i");
18971c
                 [ "${_rl%/$_cmd}" != "$_rl" ] || continue