From: Stig Telfer Date: Fri, 24 Jan 2014 15:48:32 +0000 (+0000) Subject: dracut-lib.sh: bugfix for pidof function X-Git-Tag: RHEL-7.1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f117f4db3425229f9a9b107682ad05b8ba613ea;p=thirdparty%2Fdracut.git dracut-lib.sh: bugfix for pidof function In follow-up, the patch requires a second mod: kernel tasks have a /proc/.../exe that links to nothing and derails the for loop: --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 61e5a81aa..d892c26db 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -967,7 +967,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then [ -z "$_cmd" ] && return 1 _exe=$(type -P "$1") for i in /proc/*/exe; do - [ -e "$i" ] || return 1 + [ -e "$i" ] || continue if [ -n "$_exe" ]; then [ "$i" -ef "$_exe" ] || continue else