From e502fd3099159479c303b9ab22e344d3a07ab7a7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 22 Jul 2014 11:51:08 +0200 Subject: [PATCH] base/dracut-lib:pidof() turn off debugging (cherry picked from commit ad8638e04e4ac3641afee0e273c91aa3fb6d4278) --- modules.d/99base/dracut-lib.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 417cfd8e..be724df0 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -966,13 +966,17 @@ wait_for_loginit() # pidof version for root if ! command -v pidof >/dev/null 2>/dev/null; then pidof() { + debug_off local _cmd local _exe local _rl local _ret=1 local i _cmd="$1" - [ -z "$_cmd" ] && return 1 + if [ -z "$_cmd" ]; then + debug_on + return 1 + fi _exe=$(type -P "$1") for i in /proc/*/exe; do [ -e "$i" ] || continue @@ -986,6 +990,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then echo ${i##/proc/} _ret=0 done + debug_on return $_ret } fi