]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base/dracut-lib.sh:info() be more quiet
authorHarald Hoyer <harald@redhat.com>
Fri, 25 Sep 2015 15:07:07 +0000 (11:07 -0400)
committerHarald Hoyer <harald@redhat.com>
Fri, 25 Sep 2015 16:42:15 +0000 (12:42 -0400)
modules.d/99base/dracut-lib.sh

index b6593a067ab2adcee862917f44cc9f5f2d324942..50bcf8406efb139ae10322168aa30acff79bd2c3 100755 (executable)
@@ -61,7 +61,9 @@ else
     }
 
     info() {
-        echo "$*" >&2
+        check_quiet
+        [ "$DRACUT_QUIET" != "yes" ] && \
+            echo "$*" >&2
     }
 
 fi
@@ -461,9 +463,11 @@ check_quiet() {
         DRACUT_QUIET="yes"
         getargbool 0 rd.info -d -y rdinfo && DRACUT_QUIET="no"
         getargbool 0 rd.debug -d -y rdinitdebug && DRACUT_QUIET="no"
-        getarg quiet || DRACUT_QUIET="yes"
-        a=$(getarg loglevel=)
-        [ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes"
+        if [ -z "$DRACUT_SYSTEMD" ]; then
+            getarg quiet || DRACUT_QUIET="yes"
+            a=$(getarg loglevel=)
+            [ -n "$a" ] && [ $a -ge 28 ] && DRACUT_QUIET="yes"
+        fi
         export DRACUT_QUIET
     fi
 }