From fe74a7069bb24ecfb8d2d948955236ff31ae7571 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Fri, 25 Sep 2015 11:07:07 -0400
Subject: [PATCH] base/dracut-lib.sh:info() be more quiet
---
modules.d/99base/dracut-lib.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
index b6593a06..50bcf840 100755
--- a/modules.d/99base/dracut-lib.sh
+++ b/modules.d/99base/dracut-lib.sh
@@ -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
}