slitaz-boot-scripts diff 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 diff
     1.1 --- a/etc/init.d/i18n.sh	Tue Feb 02 22:50:39 2010 +0100
     1.2 +++ b/etc/init.d/i18n.sh	Fri Apr 29 16:06:08 2011 +0200
     1.3 @@ -6,22 +6,21 @@
     1.4  . /etc/init.d/rc.functions
     1.5  
     1.6  # Locale config.
     1.7 -echo "Checking if /etc/locale.conf exists... "
     1.8  if [ -s "/etc/locale.conf" ]; then
     1.9 -	echo -n "Locale configuration file exists... "
    1.10 -	status
    1.11 +	. /etc/locale.conf
    1.12 +	echo -n "Locale configuration: $LANG" && status
    1.13  else
    1.14  	tazlocale
    1.15  fi
    1.16  
    1.17  # Keymap config.
    1.18  if [ -s "/etc/keymap.conf" ]; then
    1.19 -	KEYMAP=`cat /etc/keymap.conf`
    1.20 -	echo "Keymap configuration: $KEYMAP"
    1.21 +	keymap=`cat /etc/keymap.conf`
    1.22 +	echo -n "Keymap configuration: $keymap" && status
    1.23  	if [ -x /bin/loadkeys ]; then
    1.24 -		loadkeys $KEYMAP
    1.25 +		loadkeys $keymap
    1.26  	else
    1.27 -		loadkmap < /usr/share/kmap/$KEYMAP.kmap
    1.28 +		loadkmap < /usr/share/kmap/$keymap.kmap
    1.29  	fi
    1.30  else
    1.31  	tazkeymap
    1.32 @@ -30,8 +29,8 @@
    1.33  # Timezone config. Set timezone using the keymap config for fr, be, fr_CH
    1.34  # and ca with Montreal.
    1.35  if [ ! -s "/etc/TZ" ]; then
    1.36 -	KEYMAP=`cat /etc/keymap.conf`
    1.37 -	case "$KEYMAP" in
    1.38 +	keymap=`cat /etc/keymap.conf`
    1.39 +	case "$keymap" in
    1.40  		fr-latin1|be-latin1)
    1.41  			echo -n "Setting timezone to Europe/Paris... "
    1.42  			echo "Europe/Paris" > /etc/TZ && status
    1.43 @@ -51,46 +50,3 @@
    1.44  	esac
    1.45  fi
    1.46  
    1.47 -# Firefox hack to get the right locale.
    1.48 -if grep -q "fr_*" /etc/locale.conf; then
    1.49 -	# But is the fox installed ?
    1.50 -	if [ -f "/var/lib/tazpkg/installed/firefox/receipt" ]; then
    1.51 -		. /var/lib/tazpkg/installed/firefox/receipt
    1.52 -		sed -i 's/en-US/fr/' /etc/firefox/pref/firefox-l10n.js
    1.53 -	fi
    1.54 -fi
    1.55 -
    1.56 -# Gen a motd in french if fr_* or in English by default.
    1.57 -if [ ! -s "/etc/motd" ]; then
    1.58 -if grep -q "fr_*" /etc/locale.conf; then
    1.59 -		# FR
    1.60 -		cat > /etc/motd << "EOF"
    1.61 -
    1.62 -
    1.63 -  (°-  { Documentation dans /usr/share/doc. Utiliser 'less -EM' pour,
    1.64 -  //\    lire des fichiers, devenir root avec 'su' et éditer avec 'nano'.
    1.65 -  v_/_   Taper 'startx' pour lancer une session X. }
    1.66 -
    1.67 -  SliTaz GNU/Linux est distribuée dans l'espoir qu'elle sera utile, mais
    1.68 -  alors SANS AUCUNE GARANTIE.
    1.69 -
    1.70 -
    1.71 -EOF
    1.72 -	else
    1.73 -		# EN
    1.74 -		cat > /etc/motd << "EOF"
    1.75 -
    1.76 -
    1.77 -  (°-  { Documentation in /usr/share/doc. Use 'less -EM' to read files,
    1.78 -  //\    become root with 'su' and edit using 'nano'.
    1.79 -  v_/_   Type 'startx' to start a X window session. }
    1.80 -
    1.81 -  SliTaz GNU/Linux is distributed in the hope that it will be useful, but
    1.82 -  with ABSOLUTELY NO WARRANTY.
    1.83 -
    1.84 -
    1.85 -EOF
    1.86 -
    1.87 -	fi
    1.88 -
    1.89 -fi