From 09bfb5033230e6846414bc6002aa12ce09c23687 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 19 Sep 2011 17:45:17 -0400 Subject: 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. --- rc.d/init.d/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rc.d') 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 -- cgit v1.2.1