Blame SOURCES/0199-base-dracut-lib-pidof-turn-off-debugging.patch

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