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

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