slitaz-boot-scripts rev 299
No more locale/keymap config at boot! Use syslinux menu. and fix opt wm=
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 17 15:56:40 2012 +0200 (2012-04-17) |
parents | ee634adc6b03 |
children | 1dbfd813e21e |
files | etc/init.d/bootopts.sh etc/init.d/system.sh |
line diff
1.1 --- a/etc/init.d/bootopts.sh Fri Apr 06 08:18:09 2012 +0200 1.2 +++ b/etc/init.d/bootopts.sh Tue Apr 17 15:56:40 2012 +0200 1.3 @@ -148,9 +148,6 @@ 1.4 do 1.5 modprobe $mod 1.6 done 1.7 - grep -qs batt /etc/lxpanel/default/panels/panel || 1.8 - sed -i 's/= cpu/= batt\n}\n\nPlugin {\n type = cpu/' \ 1.9 - /etc/lxpanel/default/panels/panel 2> /dev/null 1.10 # Enable Kernel Laptop mode. 1.11 echo "5" > /proc/sys/vm/laptop_mode ;; 1.12 mount) 1.13 @@ -183,17 +180,18 @@ 1.14 fi ;; 1.15 wm=*) 1.16 # Check for a Window Manager (for a flavor, default WM can be changed 1.17 - # with boot options or with an addfile in /etc/X11/wm.default. 1.18 + # with boot options or via /etc/slitaz/applications.conf). 1.19 WM=${opt#wm=} 1.20 - mkdir -p /etc/X11 1.21 case $WM in 1.22 - jwm) 1.23 - echo "jwm" > /etc/X11/wm.default ;; 1.24 ob|openbox|openbox-session) 1.25 - echo "openbox" > /etc/X11/wm.default ;; 1.26 + WM=openbox-session ;; 1.27 e17|enlightenment|enlightenment_start) 1.28 - echo "enlightenment" > /etc/X11/wm.default ;; 1.29 - esac ;; 1.30 + WM=enlightenment ;; 1.31 + razorqt|razor-session) 1.32 + WM=razor-session ;; 1.33 + esac 1.34 + sed -i s/"WINDOW_MANAGER=.*"/"WINDOW_MANAGER=\"$WM\""/ \ 1.35 + /etc/slitaz/applications.conf ;; 1.36 *) 1.37 continue ;; 1.38 esac
2.1 --- a/etc/init.d/system.sh Fri Apr 06 08:18:09 2012 +0200 2.2 +++ b/etc/init.d/system.sh Tue Apr 17 15:56:40 2012 +0200 2.3 @@ -85,28 +85,24 @@ 2.4 # Locale config. Do a gui config for both lang/keymap. 2.5 echo "Checking if /etc/locale.conf exists... " 2.6 if [ ! -s "/etc/locale.conf" ]; then 2.7 - if [ "$SCREEN" != "text" ] && [ -x /usr/bin/Xorg ]; then 2.8 - echo "Starting TazBox configuration..." 2.9 - DISPLAY=:1 tazbox boot 2.10 - else 2.11 - tazlocale 2.12 - fi 2.13 -else 2.14 - lang=$(cat /etc/locale.conf | fgrep LANG | cut -d "=" -f 2) 2.15 - echo -n "Locale configuration: $lang" && status 2.16 + echo "Setting system locale to: C (English)" 2.17 + echo -e "LANG=POSIX\nLC_ALL=POSIX" > /etc/locale.conf 2.18 fi 2.19 +echo -n "Locale configuration: $LANG" 2.20 +. /etc/locale.conf 2.21 +export LANG LC_ALL 2.22 +status 2.23 2.24 # Keymap config. 2.25 -if [ -s "/etc/keymap.conf" ]; then 2.26 - KEYMAP=$(cat /etc/keymap.conf) 2.27 - echo "Keymap configuration: $KEYMAP" 2.28 - if [ -x /bin/loadkeys ]; then 2.29 - loadkeys $KEYMAP 2.30 - else 2.31 - loadkmap < /usr/share/kmap/$KEYMAP.kmap 2.32 - fi 2.33 +if [ ! -s "/etc/keymap.conf" ]; then 2.34 + echo "us" > /etc/keymap.conf 2.35 +fi 2.36 +KEYMAP=$(cat /etc/keymap.conf) 2.37 +echo "Keymap configuration: $KEYMAP" 2.38 +if [ -x /bin/loadkeys ]; then 2.39 + loadkeys $KEYMAP 2.40 else 2.41 - tazkeymap 2.42 + loadkmap < /usr/share/kmap/$KEYMAP.kmap 2.43 fi 2.44 2.45 # Timezone config. Set timezone using the keymap config for fr, be, fr_CH