From fa4866f0adce9c3e0bfc09fb878eebb99797c338 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 18 Oct 2007 08:43:28 +0000 Subject: 'upgpkg: trying to fix #6237,7554,7165,7641,5740' --- rc.sysinit | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index b577707..c531eab 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -322,33 +322,40 @@ fi status "Updating Module Dependencies" /sbin/depmod -A -if [ "$KEYMAP" != "" ]; then - status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP -fi - # Flush old locale settings : >/etc/profile.d/locale.sh chmod 755 /etc/profile.d/locale.sh # Set user defined locale -[ "$LOCALE" != "" ] || LOCALE="en_US" +[ -z "$LOCALE" ] && LOCALE="en_US" stat_busy "Setting Locale: $LOCALE" echo "export LANG=$LOCALE" >>/etc/profile.d/locale.sh stat_done -# If locale is *.utf set console to Unicode mode -if [ "$(echo $LOCALE | /bin/grep -i utf)" ]; then +if echo "$LOCALE" | /bin/grep -qi utf ; then stat_busy "Setting Consoles to UTF-8" /usr/bin/kbd_mode -u - /usr/bin/dumpkeys | /bin/loadkeys --unicode + for i in $(seq 1 12); do + echo -ne "\e%G" >/dev/vc/${i} + done + stat_done + stat_busy "Loading Keyboard Map: $KEYMAP in utf-8 mode" + /bin/loadkeys -q -u "$KEYMAP" > /dev/null 2>&1 +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 [ "$CONSOLEFONT" != "" ]; then +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 [ "$CONSOLEMAP" != "" ]; then + if [ -n "$CONSOLEMAP" ]; then /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C /dev/vc/${i} else /usr/bin/setfont $CONSOLEFONT -C /dev/vc/${i} @@ -358,6 +365,7 @@ if [ "$CONSOLEFONT" != "" ]; then echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then echo -ne "\e(K"; fi' >>/etc/profile.d/locale.sh stat_done fi + # Adding persistent network/cdrom generated rules if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then stat_busy "Adding persistent cdrom udev rules" @@ -369,6 +377,7 @@ if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules stat_done fi + # Screen blanks after 15 minutes idle time /usr/bin/setterm -blank 15 -- cgit v1.2.3