slitaz-boot-scripts view etc/init.d/i18n.sh @ rev 254

Huge change in boot... we start X as soon as possible by default, for this we have to config keymap, locale, user and home before, let do that in rcS. Also some fixes such as TZ
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 29 16:06:08 2011 +0200 (2011-04-29)
parents a984593d0121
children
line source
1 #!/bin/sh
2 # /etc/init.d/i18n.sh - Internationalization initialization.
3 #
4 # This script configures SliTaz default keymap, locale, timezone.
5 #
6 . /etc/init.d/rc.functions
8 # Locale config.
9 if [ -s "/etc/locale.conf" ]; then
10 . /etc/locale.conf
11 echo -n "Locale configuration: $LANG" && status
12 else
13 tazlocale
14 fi
16 # Keymap config.
17 if [ -s "/etc/keymap.conf" ]; then
18 keymap=`cat /etc/keymap.conf`
19 echo -n "Keymap configuration: $keymap" && status
20 if [ -x /bin/loadkeys ]; then
21 loadkeys $keymap
22 else
23 loadkmap < /usr/share/kmap/$keymap.kmap
24 fi
25 else
26 tazkeymap
27 fi
29 # Timezone config. Set timezone using the keymap config for fr, be, fr_CH
30 # and ca with Montreal.
31 if [ ! -s "/etc/TZ" ]; then
32 keymap=`cat /etc/keymap.conf`
33 case "$keymap" in
34 fr-latin1|be-latin1)
35 echo -n "Setting timezone to Europe/Paris... "
36 echo "Europe/Paris" > /etc/TZ && status
37 ;;
38 fr_CH-latin1|de_CH-latin1)
39 echo -n "Setting timezone to Europe/Zurich... "
40 echo "Europe/Zurich" > /etc/TZ && status
41 ;;
42 cf)
43 echo -n "Setting timezone to America/Montreal... "
44 echo "America/Montreal" > /etc/TZ && status
45 ;;
46 *)
47 echo -n "Setting default timezone to UTC... "
48 echo "UTC" > /etc/TZ && status
49 ;;
50 esac
51 fi