]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib:pidof() turn off debugging
authorHarald Hoyer <harald@redhat.com>
Tue, 22 Jul 2014 09:51:08 +0000 (11:51 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 29 Jul 2014 10:06:46 +0000 (12:06 +0200)
(cherry picked from commit ad8638e04e4ac3641afee0e273c91aa3fb6d4278)

modules.d/99base/dracut-lib.sh

index 417cfd8ef4291a4531a869b3af42bf8367963869..be724df0e9338735bf7435016f1e7c234fa693d8 100755 (executable)
@@ -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