base/dracut-lib.sh: change output of info() and warn() for systemd

master
Harald Hoyer 2012-06-21 01:09:38 +02:00
parent e08710a289
commit d9087a2d85
1 changed files with 25 additions and 11 deletions

View File

@ -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