diff options
author | Tobias Powalowski <tpowa@archlinux.org> | 2007-10-18 08:43:28 +0000 |
---|---|---|
committer | Tobias Powalowski <tpowa@archlinux.org> | 2007-10-18 08:43:28 +0000 |
commit | fa4866f0adce9c3e0bfc09fb878eebb99797c338 (patch) | |
tree | d881077369a0c811db6c8250972572b3ba01cec4 /rc.sysinit | |
parent | 8649f79e8e0027bd46da8b13f6d8ac5465471c35 (diff) | |
download | initscripts-fa4866f0adce9c3e0bfc09fb878eebb99797c338.tar.xz |
'upgpkg: trying to fix #6237,7554,7165,7641,5740'
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-x | rc.sysinit | 31 |
1 files changed, 20 insertions, 11 deletions
@@ -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 |