# Flush old locale settings : >/etc/profile.d/locale.sh chmod 755 /etc/profile.d/locale.sh # Set user defined locale [ -z "$LOCALE" ] && LOCALE="en_US" stat_busy "Setting Locale: $LOCALE" echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh 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 12); do echo -ne "\e%G" >/dev/vc/${i} done stat_done stat_busy "Loading keymap in utf-8 mode: $KEYMAP" /bin/loadkeys -q -u "$KEYMAP" stat_done else stat_busy "Loading keymap in legacy mode: $KEYMAP" /bin/loadkeys -q "$KEYMAP" stat_done fi if [ -n "$CONSOLEFONT" ]; then stat_busy "Loading Console Font: $CONSOLEFONT" #CONSOLEMAP in UTF-8 shouldn't be used if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then CONSOLEMAP="" fi for i in $(seq 1 12); do if [ -n "$CONSOLEMAP" ]; then /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} else /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} fi done stat_done fi