slitaz-boot-scripts rev 300 5.0
Use new tazlocale and tazkeymap functions
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed May 02 00:04:50 2012 +0200 (2012-05-02) |
parents | 8cc80e0d7d4e |
children | 8c7926208f7c |
files | etc/init.d/bootopts.sh etc/init.d/system.sh |
line diff
1.1 --- a/etc/init.d/bootopts.sh Tue Apr 17 15:56:40 2012 +0200 1.2 +++ b/etc/init.d/bootopts.sh Wed May 02 00:04:50 2012 +0200 1.3 @@ -68,9 +68,7 @@ 1.4 lang=*) 1.5 # Check for a specified locale (lang=*). 1.6 LANG=${opt#lang=} 1.7 - echo -n "Setting system locale to: $LANG... " 1.8 - tazlocale init $LANG 1.9 - status ;; 1.10 + /sbin/tazlocale $LANG ;; 1.11 kmap=*) 1.12 # Check for a specified keymap (kmap=*). 1.13 KEYMAP=${opt#kmap=} 1.14 @@ -105,7 +103,7 @@ 1.15 || mount /dev/$DEVID /home 1.16 case "$(/sbin/blkid | grep /dev/$DEVID:)" in 1.17 *\"ntfs\"*|*\"vfat\"*) mount.posixovl /home ;; 1.18 - esac 1.19 + esac 1.20 # Check if swap file must be generated in /home: swap=size (Mb). 1.21 # This option is only used within home=device. 1.22 if grep -q "swap=[1-9]*" /proc/cmdline; then
2.1 --- a/etc/init.d/system.sh Tue Apr 17 15:56:40 2012 +0200 2.2 +++ b/etc/init.d/system.sh Wed May 02 00:04:50 2012 +0200 2.3 @@ -82,34 +82,29 @@ 2.4 # Auto recharge packages list (after network connection of course) 2.5 [ "$RECHARGE_PACKAGES_LIST" == "yes" ] && tazpkg recharge & 2.6 2.7 -# Locale config. Do a gui config for both lang/keymap. 2.8 +# Locale config. 2.9 echo "Checking if /etc/locale.conf exists... " 2.10 if [ ! -s "/etc/locale.conf" ]; then 2.11 - echo "Setting system locale to: C (English)" 2.12 + echo "Setting system locale to: POSIX (English)" 2.13 echo -e "LANG=POSIX\nLC_ALL=POSIX" > /etc/locale.conf 2.14 fi 2.15 +. /etc/locale.conf 2.16 echo -n "Locale configuration: $LANG" 2.17 -. /etc/locale.conf 2.18 -export LANG LC_ALL 2.19 -status 2.20 +export LC_ALL 2.21 +. /lib/libtaz.sh && status 2.22 2.23 -# Keymap config. 2.24 +# Keymap config. Default to us in live mode if kmap= was not used. 2.25 if [ ! -s "/etc/keymap.conf" ]; then 2.26 echo "us" > /etc/keymap.conf 2.27 fi 2.28 -KEYMAP=$(cat /etc/keymap.conf) 2.29 -echo "Keymap configuration: $KEYMAP" 2.30 -if [ -x /bin/loadkeys ]; then 2.31 - loadkeys $KEYMAP 2.32 -else 2.33 - loadkmap < /usr/share/kmap/$KEYMAP.kmap 2.34 -fi 2.35 +kmap=$(cat /etc/keymap.conf) 2.36 +echo "Keymap configuration: $kmap" 2.37 +/sbin/tazkeymap $kmap 2.38 2.39 # Timezone config. Set timezone using the keymap config for fr, be, fr_CH 2.40 # and ca with Montreal. 2.41 if [ ! -s "/etc/TZ" ]; then 2.42 - map=$(cat /etc/keymap.conf) 2.43 - case "$map" in 2.44 + case "$kmap" in 2.45 fr-latin1|be-latin1) 2.46 echo "Europe/Paris" > /etc/TZ ;; 2.47 fr_CH-latin1|de_CH-latin1)