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

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