Commit 02c2e2ecbc1d68ad3237ef7c86022b3539b55c63

Authored by Silvan Calarco
1 parent ed400fd40c
Exists in master

Set /etc/localtime as a symlink and abandon /etc/timezone

Showing 9 changed files with 19 additions and 59 deletions Side-by-side Diff

platforms/livecd-gnome-root/post.inc.sh
... ... @@ -38,8 +38,7 @@
38 38 es) timezone=Europe/Madrid ;;
39 39 *) timezone=UTC ;;
40 40 esac
41   -echo $timezone > $MOUNTDIR/etc/timezone
42   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  41 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
43 42  
44 43 # clean rpm database before doing other operations with internal rpm
45 44 # to fix cross x86/x86_64 installation error:
platforms/livecd-light-root/post.inc.sh
... ... @@ -27,8 +27,7 @@
27 27 es) timezone=Europe/Madrid ;;
28 28 *) timezone=UTC ;;
29 29 esac
30   -echo $timezone > $MOUNTDIR/etc/timezone
31   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  30 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
32 31  
33 32 # clean rpm database before doing other operations with internal rpm
34 33 # to fix cross x86/x86_64 installation error:
platforms/livecd-root/post.inc.sh
... ... @@ -34,8 +34,7 @@
34 34 es) timezone=Europe/Madrid ;;
35 35 *) timezone=UTC ;;
36 36 esac
37   -echo $timezone > $MOUNTDIR/etc/timezone
38   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  37 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
39 38  
40 39 # configure favorites in kde menu
41 40 for f in /usr/share/applications/chromium-devel.desktop; do
platforms/livedvd-root/post.inc.sh
... ... @@ -29,16 +29,17 @@
29 29  
30 30 # set timezone according to LANGUAGE (default is UTC)
31 31 #
32   -case $LANGUAGE in
33   - it) timezone=Europe/Rome ;;
34   - es) timezone=Europe/Madrid ;;
35   - fr) timezone=Europe/Paris ;;
36   - de) timezone=Europe/Berlin ;;
37   - en) timezone=Europe/London ;;
38   - *) timezone=UTC ;;
39   -esac
40   -echo $timezone > $MOUNTDIR/etc/timezone
41   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  32 +if [ ! "$MULTILANGUAGE" ]; then
  33 + case $LANGUAGE in
  34 + it) timezone=Europe/Rome ;;
  35 + es) timezone=Europe/Madrid ;;
  36 + fr) timezone=Europe/Paris ;;
  37 + de) timezone=Europe/Berlin ;;
  38 + en) timezone=Europe/London ;;
  39 + *) timezone=UTC ;;
  40 + esac
  41 + ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  42 +fi
42 43  
43 44 # configure favorites in kde menu
44 45 for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/amarok.desktop; do
platforms/livegames-root/post.inc.sh
... ... @@ -34,8 +34,7 @@
34 34 es) timezone=Europe/Madrid ;;
35 35 *) timezone=UTC ;;
36 36 esac
37   -echo $timezone > $MOUNTDIR/etc/timezone
38   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  37 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
39 38  
40 39 # configure favorites in kde menu
41 40 for f in /usr/share/applications/chromium-devel.desktop; do
platforms/rootfs-light/post.inc.sh
... ... @@ -34,24 +34,6 @@
34 34 #chkconfig --del portmap
35 35 #"
36 36  
37   -## use system default language
38   -#> $MOUNTDIR/etc/sysconfig/i18n
39   -
40   -# set localtime (default to Europe/Berlin)
41   -case $LANGUAGE in
42   - it) timezone=Europe/Rome ;;
43   - es) timezone=Europe/Madrid ;;
44   - *) timezone=Europe/Berlin ;;
45   -esac
46   -echo $timezone > $MOUNTDIR/etc/timezone
47   -cp /usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
48   -
49   -# disable automatic depmod and ldconfig execution on boot (also due to clock error)
50   -cat >> $MOUNTDIR/etc/sysconfig/rc << _EOF
51   -no_auto_depmod=1
52   -no_auto_ldconfig=1
53   -_EOF
54   -
55 37 # configure touchscreen
56 38 cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
57 39 TSLIB_CONFFILE=/etc/ts.conf
... ... @@ -89,8 +71,7 @@
89 71 es) timezone=Europe/Madrid ;;
90 72 *) timezone=UTC ;;
91 73 esac
92   -echo $timezone > $MOUNTDIR/etc/timezone
93   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  74 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
94 75  
95 76 # remove some documentation to save space
96 77 for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do
platforms/rootfs/post.inc.sh
... ... @@ -37,21 +37,6 @@
37 37 ## use system default language
38 38 #> $MOUNTDIR/etc/sysconfig/i18n
39 39  
40   -# set localtime (default to Europe/Berlin)
41   -case $LANGUAGE in
42   - it) timezone=Europe/Rome ;;
43   - es) timezone=Europe/Madrid ;;
44   - *) timezone=Europe/Berlin ;;
45   -esac
46   -echo $timezone > $MOUNTDIR/etc/timezone
47   -cp /usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
48   -
49   -# disable automatic depmod and ldconfig execution on boot (also due to clock error)
50   -cat >> $MOUNTDIR/etc/sysconfig/rc << _EOF
51   -no_auto_depmod=1
52   -no_auto_ldconfig=1
53   -_EOF
54   -
55 40 # configure touchscreen
56 41 cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
57 42 TSLIB_CONFFILE=/etc/ts.conf
... ... @@ -93,8 +78,7 @@
93 78 es) timezone=Europe/Madrid ;;
94 79 *) timezone=UTC ;;
95 80 esac
96   -echo $timezone > $MOUNTDIR/etc/timezone
97   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  81 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
98 82  
99 83 # configure favorites in kde menu
100 84 for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do
platforms/testcd-root/post.inc.sh
... ... @@ -34,8 +34,7 @@
34 34 es) timezone=Europe/Madrid ;;
35 35 *) timezone=UTC ;;
36 36 esac
37   -echo $timezone > $MOUNTDIR/etc/timezone
38   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  37 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
39 38  
40 39 # configure favorites in kde menu
41 40 for f in /usr/share/applications/chromium-devel.desktop; do
platforms/virtualserver/post.inc.sh
... ... @@ -34,8 +34,7 @@
34 34 it) timezone=Europe/Rome ;;
35 35 *) timezone=UTC ;;
36 36 esac
37   -echo $timezone > $MOUNTDIR/etc/timezone
38   -cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
  37 +ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
39 38  
40 39 prelink
41 40