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

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