From: Stig Telfer Date: Fri, 24 Jan 2014 15:19:11 +0000 (+0000) Subject: dracut-lib.sh: bugfix for pidof function X-Git-Tag: 035~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=abdf191b64af759fcfd57ab0f17ff17de71a78ef;p=thirdparty%2Fdracut.git dracut-lib.sh: bugfix for pidof function 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 --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 878bb63a9..63401baa7 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -976,7 +976,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