From: Harald Hoyer Date: Wed, 20 Jun 2012 23:09:38 +0000 (+0200) Subject: base/dracut-lib.sh: change output of info() and warn() for systemd X-Git-Tag: 020~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9087a2d85dd65e1e33c8c2247d4fccfd7fbc5da;p=thirdparty%2Fdracut.git base/dracut-lib.sh: change output of info() and warn() for systemd --- diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh index 8cfd7b34a..e0c4c19aa 100755 --- a/modules.d/99base/dracut-lib.sh +++ b/modules.d/99base/dracut-lib.sh @@ -323,18 +323,32 @@ check_quiet() { fi } -warn() { - check_quiet - echo "<28>dracut Warning: $@" > /dev/kmsg - echo "dracut Warning: $@" >&2 -} +if [ ! -x /lib/systemd/systemd ]; then -info() { - check_quiet - echo "<30>dracut: $@" > /dev/kmsg - [ "$DRACUT_QUIET" != "yes" ] && \ - echo "dracut: $@" -} + warn() { + check_quiet + echo "<28>dracut Warning: $@" > /dev/kmsg + echo "dracut Warning: $@" >&2 + } + + info() { + check_quiet + echo "<30>dracut: $@" > /dev/kmsg + [ "$DRACUT_QUIET" != "yes" ] && \ + echo "dracut: $@" + } + +else + + warn() { + echo "Warning: $@" >&2 + } + + info() { + echo "$@" + } + +fi vwarn() { while read line; do