From: Stig Telfer Date: Fri, 24 Jan 2014 15:48:32 +0000 (+0000) Subject: dracut-lib.sh: bugfix for pidof function X-Git-Tag: 035~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cc8f694b5b651177c4739bffc3bbadddc04ca82;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 63401baa7..763b7e242 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -974,7 +974,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