From 59f89b4a25fbc100551a814f5bcf81aa05b6c2e7 Mon Sep 17 00:00:00 2001 From: Roman Kyrylych Date: Sun, 21 Oct 2007 15:24:57 +0300 Subject: Fix locale handling Signed-off-by: Roman Kyrylych --- rc.sysinit | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/rc.sysinit b/rc.sysinit index 4ee0063..c63c1d9 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -348,19 +348,17 @@ stat_done if echo "$LOCALE" | /bin/grep -qi utf ; then stat_busy "Setting Consoles to UTF-8" /usr/bin/kbd_mode -u - for i in $(seq 1 63); do - echo -ne "\e%G" >/dev/vc/${i} - done + # the $CONSOLE check helps us avoid this when running scripts from cron + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh stat_done stat_busy "Loading Keyboard Map: $KEYMAP in utf-8 mode" /bin/loadkeys -q -u "$KEYMAP" > /dev/null 2>&1 + stat_done else stat_busy "Loading Keyboard Map: $KEYMAP in legacy mode" /bin/loadkeys -q "$KEYMAP" > /dev/null 2>&1 -fi - # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e%G"; fi' >>/etc/profile.d/locale.sh stat_done +fi if [ -n "$CONSOLEFONT" ]; then stat_busy "Loading Console Font: $CONSOLEFONT" @@ -368,7 +366,7 @@ if [ -n "$CONSOLEFONT" ]; then if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then CONSOLEMAP="" fi - for i in $(seq 1 12); do + for i in $(seq 1 63); do if [ -n "$CONSOLEMAP" ]; then /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} else -- cgit v1.2.3