]> 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, 22 Jul 2014 09:51:40 +0000 (11:51 +0200)
modules.d/99base/dracut-lib.sh

index a77b843377c59f7310925dc10e220b2bd4f165e1..abcebf5be8353a88ab657ced65baddd239bee0e2 100755 (executable)
@@ -991,13 +991,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
@@ -1011,6 +1015,7 @@ if ! command -v pidof >/dev/null 2>/dev/null; then
             echo ${i##/proc/}
             _ret=0
         done
+        debug_on
         return $_ret
     }
 fi