aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-09-19 17:45:17 -0400
committerBill Nottingham <notting@redhat.com>2011-09-19 17:45:17 -0400
commit09bfb5033230e6846414bc6002aa12ce09c23687 (patch)
tree226124219ec156d6ff5bbea0bd2418bcf38be038 /rc.d/init.d
parente270fc3c0954c5145960c6ce7baffba0ed0448a9 (diff)
downloadinitscripts-09bfb5033230e6846414bc6002aa12ce09c23687.tar
initscripts-09bfb5033230e6846414bc6002aa12ce09c23687.tar.gz
initscripts-09bfb5033230e6846414bc6002aa12ce09c23687.tar.bz2
initscripts-09bfb5033230e6846414bc6002aa12ce09c23687.tar.xz
initscripts-09bfb5033230e6846414bc6002aa12ce09c23687.zip
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.
Diffstat (limited to 'rc.d/init.d')
-rw-r--r--rc.d/init.d/functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 79545b51..e313e35b 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