diff options
author | Bill Nottingham <notting@redhat.com> | 2011-09-19 17:45:17 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2011-09-19 17:45:17 -0400 |
commit | 09bfb5033230e6846414bc6002aa12ce09c23687 (patch) | |
tree | 226124219ec156d6ff5bbea0bd2418bcf38be038 /rc.d | |
parent | e270fc3c0954c5145960c6ce7baffba0ed0448a9 (diff) | |
download | initscripts-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')
-rw-r--r-- | rc.d/init.d/functions | 4 |
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 |