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

Fix typos
author Mike D. Smith <MikeDSmith25@gmail.com>
date Sat Jul 19 06:54:49 2008 +0000 (2008-07-19)
parents 4c2fb6625173
children ae0a8f86229a
line source
1 #!/bin/sh
2 # /etc/init.d/i18n.sh - Internalisation initialisation.
3 # This script configure SliTaz default keymap, locale and timezone.
4 #
5 . /etc/init.d/rc.functions
7 # Locale config.
8 #
9 echo "Cheking if /etc/locale.conf exist... "
10 if [ -s "/etc/locale.conf" ]; then
11 echo -n "Locale configuration file exists... "
12 status
13 else
14 tazlocale
15 fi
17 # Keymap config.
18 #
19 if [ -s "/etc/keymap.conf" ]; then
20 KEYMAP=`cat /etc/keymap.conf`
21 echo "Keymap configuration: $KEYMAP"
22 if [ -x /bin/loadkeys ]; then
23 loadkeys $KEYMAP
24 else
25 loadkmap < /usr/share/kmap/$KEYMAP.kmap
26 fi
27 else
28 tazkeymap
29 fi
31 # Timezone config. Set timezone using the keymap config for fr, be, fr_CH
32 # and ca with Montreal.
33 #
34 if [ ! -s "/etc/TZ" ]; then
35 KEYMAP=`cat /etc/keymap.conf`
36 case "$KEYMAP" in
37 fr-latin1|be-latin1)
38 echo -n "Setting timezone to Europe/Paris... "
39 echo "Europe/Paris" > /etc/TZ && status
40 ;;
41 fr_CH-latin1|de_CH-latin1)
42 echo -n "Setting timezone to Europe/Zurich... "
43 echo "Europe/Zurich" > /etc/TZ && status
44 ;;
45 cf)
46 echo -n "Setting timezone to America/Montreal... "
47 echo "America/Montreal" > /etc/TZ && status
48 ;;
49 *)
50 echo -n "Setting default timezone to UTC... "
51 echo "UTC" > /etc/TZ && status
52 ;;
53 esac
54 fi
56 # Firefox hack to get the right locale.
57 #
58 if grep -q "fr_*" /etc/locale.conf; then
59 # But is the fox installed ?
60 if [ -f "/var/lib/tazpkg/installed/firefox/receipt" ]; then
61 . /var/lib/tazpkg/installed/firefox/receipt
62 sed -i 's/en-US/fr/' /etc/firefox/pref/firefox-l10n.js
63 fi
64 fi
66 # Gen a motd in french if fr_* or in English by default.
67 #
68 if [ ! -s "/etc/motd" ]; then
69 if grep -q "fr_*" /etc/locale.conf; then
70 # FR
71 cat > /etc/motd << "EOF"
74 (°- { La documentation est dans /usr/share/doc. Utiliser 'less -EM' pour,
75 //\ lire des fichiers et 'clex' pour les gérer, devenir root avec 'su',
76 v_/_ éditer avec 'nano'. Taper 'startx' pour lancer une session X. }
78 SliTaz GNU/Linux est distribuée dans l'espoir qu'elle sera utile, mais
79 alors SANS AUCUNE GARANTIE.
82 EOF
83 else
84 # EN
85 cat > /etc/motd << "EOF"
88 (°- { Get documentation in /usr/share/doc. Use 'less -EM' to read files,
89 //\ become root with 'su', manage files with 'clex', edit using 'nano'.
90 v_/_ Type 'startx' to start a X window session. }
92 SliTaz GNU/Linux is distributed in the hope that it will be useful, but
93 with ABSOLUTELY NO WARRANTY.
96 EOF
98 fi
100 fi