From 0d464a67b74c213deb8328d277df732565134b02 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 9 Mar 2012 11:31:48 -0500 Subject: If /dev/stderr also isn't readable, don't bother with consoletype. --- rc.d/init.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d') diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 1437b252..7754ff21 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -54,7 +54,7 @@ systemctl_redirect () { [ -z "${COLUMNS:-}" ] && COLUMNS=80 if [ -z "${CONSOLETYPE:-}" ]; then - if [ -c "/dev/stderr" ]; then + if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)" else CONSOLETYPE="serial" -- cgit v1.2.1