slitaz-boot-scripts rev 417
system.sh: remove libtaz.sh double sourcing (thanks llev), add more TZ guess
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Nov 28 13:38:43 2015 +0200 (2015-11-28) |
parents | 29ec74a6d359 |
children | 220cadd40305 |
files | etc/init.d/system.sh |
line diff
1.1 --- a/etc/init.d/system.sh Fri Nov 27 12:48:01 2015 +0200 1.2 +++ b/etc/init.d/system.sh Sat Nov 28 13:38:43 2015 +0200 1.3 @@ -32,7 +32,6 @@ 1.4 . /etc/locale.conf 1.5 action 'Setting system locale: $LANG' 1.6 export LC_ALL=$LANG 1.7 -. /lib/libtaz.sh 1.8 status 1.9 1.10 # Keymap config: Default to us in live mode if kmap= was not used. 1.11 @@ -45,17 +44,20 @@ 1.12 /sbin/tazkeymap $kmap >/dev/null 1.13 status 1.14 1.15 -# Timezone config: Set timezone using the keymap config for fr, be, fr_CH 1.16 -# and ca with Montreal. 1.17 +# Timezone config: Set timezone using the keymap config 1.18 +# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 1.19 if [ ! -s '/etc/TZ' ]; then 1.20 case "$kmap" in 1.21 - fr-latin1|be-latin1) 1.22 - echo 'Europe/Paris' > /etc/TZ ;; 1.23 - fr_CH-latin1|de_CH-latin1) 1.24 - echo 'Europe/Zurich' > /etc/TZ ;; 1.25 - cf) echo 'America/Montreal' > /etc/TZ ;; 1.26 - *) echo 'UTC' > /etc/TZ ;; 1.27 + dk-*) tz='Europe/Copenhagen';; 1.28 + de-*) tz='Europe/Berlin';; 1.29 + es) tz='Europe/Madrid';; 1.30 + fr-*) tz='Europe/Paris';; 1.31 + be-*) tz='Europe/Brussels';; 1.32 + *_CH-*) tz='Europe/Zurich';; 1.33 + cf) tz='America/Toronto';; 1.34 + *) tz='UTC';; 1.35 esac 1.36 + echo "$tz" > /etc/TZ 1.37 fi 1.38 1.39 # Activate an eventual swap file or partition 1.40 @@ -92,10 +94,10 @@ 1.41 action 'Removing all sound packages...' 1.42 for i in $(grep -l '^DEPENDS=.*alsa-lib' /var/lib/tazpkg/installed/*/receipt) ; do 1.43 pkg=${i#/var/lib/tazpkg/installed/} 1.44 - echo 'y' | tazpkg remove ${pkg%/*} > /dev/null 1.45 + yes y | tazpkg remove ${pkg%/*} >/dev/null 1.46 done 1.47 for i in alsa-lib mhwaveedit asunder libcddb ; do 1.48 - echo 'y' | tazpkg remove $i > /dev/null 1.49 + yes y | tazpkg remove $i >/dev/null 1.50 done 1.51 status ;; 1.52 noconf)