aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rw-r--r--rc.d/init.d/functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 15fc6415..3ce93ecf 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -16,7 +16,9 @@ export PATH
# Get a sane screen width
[ -z "${COLUMNS:-}" ] && COLUMNS=80
-[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype)"
+# /sbin/consoletype checks the type of stdin. Since we are mostly
+# interested in output, we use redirection to check stdout/stderr instead.
+[ -z "${CONSOLETYPE:-}" ] && CONSOLETYPE="$(/sbin/consoletype < /dev/stderr)"
if [ -z "${NOLOCALE:-}" ] && [ -z "${LANGSH_SOURCED:-}" ] && [ -f /etc/sysconfig/i18n ] ; then
. /etc/profile.d/lang.sh 2>/dev/null