|
Harald Hoyer |
bb31e7 |
From f41720c3115011afb9577ed063a4bc521dc707ec Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
bb31e7 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
bb31e7 |
Date: Wed, 12 Aug 2015 14:28:45 +0200
|
|
Harald Hoyer |
bb31e7 |
Subject: [PATCH] base/dracut-lib.sh: forget about the idea of output
|
|
Harald Hoyer |
bb31e7 |
redirection
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
It's just not working :-/
|
|
Harald Hoyer |
bb31e7 |
---
|
|
Harald Hoyer |
bb31e7 |
modules.d/99base/dracut-lib.sh | 24 ++++--------------------
|
|
Harald Hoyer |
bb31e7 |
1 file changed, 4 insertions(+), 20 deletions(-)
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
diff --git a/modules.d/99base/dracut-lib.sh b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
bb31e7 |
index 200c263..1eaf4b3 100755
|
|
Harald Hoyer |
bb31e7 |
--- a/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
bb31e7 |
+++ b/modules.d/99base/dracut-lib.sh
|
|
Harald Hoyer |
bb31e7 |
@@ -51,45 +51,29 @@ str_ends() {
|
|
Harald Hoyer |
bb31e7 |
[ "${1%*"$2"}" != "$1" ]
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
-# Dup stdout and stderr, so that subshell redirection does not affect logging.
|
|
Harald Hoyer |
bb31e7 |
-if [ -z "$DRACUT_STDOUT" ]; then
|
|
Harald Hoyer |
bb31e7 |
- if [ -n "$BASH" ]; then
|
|
Harald Hoyer |
bb31e7 |
- readonly DRACUT_STDOUT=98
|
|
Harald Hoyer |
bb31e7 |
- readonly DRACUT_STDERR=98
|
|
Harald Hoyer |
bb31e7 |
- exec 98>&1
|
|
Harald Hoyer |
bb31e7 |
- exec 99>&2
|
|
Harald Hoyer |
bb31e7 |
- else
|
|
Harald Hoyer |
bb31e7 |
- readonly DRACUT_STDOUT=8
|
|
Harald Hoyer |
bb31e7 |
- readonly DRACUT_STDERR=9
|
|
Harald Hoyer |
bb31e7 |
- exec 8>&1
|
|
Harald Hoyer |
bb31e7 |
- exec 9>&2
|
|
Harald Hoyer |
bb31e7 |
- fi
|
|
Harald Hoyer |
bb31e7 |
-fi
|
|
Harald Hoyer |
bb31e7 |
-
|
|
Harald Hoyer |
bb31e7 |
-
|
|
Harald Hoyer |
bb31e7 |
if [ -z "$DRACUT_SYSTEMD" ]; then
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
warn() {
|
|
Harald Hoyer |
bb31e7 |
check_quiet
|
|
Harald Hoyer |
bb31e7 |
echo "<28>dracut Warning: $*" > /dev/kmsg
|
|
Harald Hoyer |
bb31e7 |
- echo "dracut Warning: $*" >&$DRACUT_STDERR
|
|
Harald Hoyer |
bb31e7 |
+ echo "dracut Warning: $*" >&2
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
info() {
|
|
Harald Hoyer |
bb31e7 |
check_quiet
|
|
Harald Hoyer |
bb31e7 |
echo "<30>dracut: $*" > /dev/kmsg
|
|
Harald Hoyer |
bb31e7 |
[ "$DRACUT_QUIET" != "yes" ] && \
|
|
Harald Hoyer |
bb31e7 |
- echo "dracut: $*" >&$DRACUT_STDERR
|
|
Harald Hoyer |
bb31e7 |
+ echo "dracut: $*" >&2
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
else
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
warn() {
|
|
Harald Hoyer |
bb31e7 |
- echo "Warning: $*" >&$DRACUT_STDERR
|
|
Harald Hoyer |
bb31e7 |
+ echo "Warning: $*" >&2
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
info() {
|
|
Harald Hoyer |
bb31e7 |
- echo "$*" >&$DRACUT_STDOUT
|
|
Harald Hoyer |
bb31e7 |
+ echo "$*"
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
fi
|