From bbad0baf36cbe5c58b6f5767ca1370af598b6dd5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 8 Jul 2003 20:22:28 +0000 Subject: check that we're the current foreground console before running unicode_start --- lang.csh | 12 +++++++----- lang.sh | 2 +- setsysfont | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lang.csh b/lang.csh index 316de43e..333463f7 100755 --- a/lang.csh +++ b/lang.csh @@ -75,11 +75,13 @@ if ($sourced == 1) then if ( "$TERM" == "linux" ) then if ( `/sbin/consoletype` == "vt" ) then if ( -x /bin/unicode_start ) then - if ( $?SYSFONT ) then - if ( $?SYSFONTACM ) then - unicode_start $SYSFONT $SYSFONTACM - else - unicode_start $SYSFONT + if { /sbin/consoletype fg } then + if ( $?SYSFONT ) then + if ( $?SYSFONTACM ) then + unicode_start $SYSFONT $SYSFONTACM + else + unicode_start $SYSFONT + endif endif endif endif diff --git a/lang.sh b/lang.sh index dd16e59d..94a3f296 100755 --- a/lang.sh +++ b/lang.sh @@ -70,7 +70,7 @@ if [ "$sourced" = 1 ]; then case $LANG in *.utf8*|*.UTF-8*) if [ "$TERM" = "linux" -a "`/sbin/consoletype`" = "vt" ]; then - [ -x /bin/unicode_start ] && unicode_start $SYSFONT $SYSFONTACM + [ -x /bin/unicode_start ] && /sbin/consoletype fg && unicode_start $SYSFONT $SYSFONTACM fi ;; esac diff --git a/setsysfont b/setsysfont index 828833c6..bcebb719 100755 --- a/setsysfont +++ b/setsysfont @@ -8,7 +8,7 @@ fi case "$LANG" in *.utf8|*.UTF-8) - if [ -x /bin/unicode_start ]; then + if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then exec unicode_start $SYSFONT $SYSFONTACM fi ;; -- cgit v1.2.1