]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut-lib.sh: bugfix for pidof function
authorStig Telfer <stelfer@cray.com>
Fri, 24 Jan 2014 15:19:11 +0000 (15:19 +0000)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 09:52:05 +0000 (11:52 +0200)
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.

Enjoy,
Stig Telfer

modules.d/99base/dracut-lib.sh

index cd6285195b9eac09e11fb676c5f4faf49284e9a0..61e5a81aaee7cec85f0e76f63ce2023082e09fd0 100755 (executable)
@@ -969,7 +969,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
         for i in /proc/*/exe; do
             [ -e "$i" ] || return 1
             if [ -n "$_exe" ]; then
-                [ "$i" -ef "$_cmd" ] || continue
+                [ "$i" -ef "$_exe" ] || continue
             else
                 _rl=$(readlink -f "$i");
                 [ "${_rl%/$_cmd}" != "$_rl" ] || continue