26 lines
832 B
Diff
26 lines
832 B
Diff
commit 09bfb5033230e6846414bc6002aa12ce09c23687
|
|
Author: Bill Nottingham <notting@redhat.com>
|
|
Date: Mon Sep 19 17:45:17 2011 -0400
|
|
|
|
Only bother with consoletype if we're actually connected to something that's console-ish. (#657869)
|
|
|
|
If we're connected to a socket, or a pipe, or a file, or anything else - assume dumb mode.
|
|
|
|
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
|
|
index 79545b5..e313e35 100644
|
|
--- a/rc.d/init.d/functions
|
|
+++ b/rc.d/init.d/functions
|
|
@@ -54,10 +54,10 @@ systemctl_redirect () {
|
|
[ -z "${COLUMNS:-}" ] && COLUMNS=80
|
|
|
|
if [ -z "${CONSOLETYPE:-}" ]; then
|
|
- if [ -r "/dev/stderr" ]; then
|
|
+ if [ -c "/dev/stderr" ]; then
|
|
CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
|
|
else
|
|
- CONSOLETYPE="$(/sbin/consoletype 2>/dev/null)"
|
|
+ CONSOLETYPE="serial"
|
|
fi
|
|
fi
|
|
|