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

This commit is contained in:
Silvan Calarco 2014-08-21 19:57:19 +02:00
parent ed400fd40c
commit 02c2e2ecbc
9 changed files with 19 additions and 59 deletions

View File

@ -38,8 +38,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# clean rpm database before doing other operations with internal rpm # clean rpm database before doing other operations with internal rpm
# to fix cross x86/x86_64 installation error: # to fix cross x86/x86_64 installation error:

View File

@ -27,8 +27,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# clean rpm database before doing other operations with internal rpm # clean rpm database before doing other operations with internal rpm
# to fix cross x86/x86_64 installation error: # to fix cross x86/x86_64 installation error:

View File

@ -34,8 +34,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do for f in /usr/share/applications/chromium-devel.desktop; do

View File

@ -29,16 +29,17 @@ chroot $MOUNTDIR update-alternatives-set-dri
# set timezone according to LANGUAGE (default is UTC) # set timezone according to LANGUAGE (default is UTC)
# #
case $LANGUAGE in if [ ! "$MULTILANGUAGE" ]; then
it) timezone=Europe/Rome ;; case $LANGUAGE in
es) timezone=Europe/Madrid ;; it) timezone=Europe/Rome ;;
fr) timezone=Europe/Paris ;; es) timezone=Europe/Madrid ;;
de) timezone=Europe/Berlin ;; fr) timezone=Europe/Paris ;;
en) timezone=Europe/London ;; de) timezone=Europe/Berlin ;;
*) timezone=UTC ;; en) timezone=Europe/London ;;
esac *) timezone=UTC ;;
echo $timezone > $MOUNTDIR/etc/timezone esac
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
fi
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/amarok.desktop; do for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/amarok.desktop; do

View File

@ -34,8 +34,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do for f in /usr/share/applications/chromium-devel.desktop; do

View File

@ -34,24 +34,6 @@
#chkconfig --del portmap #chkconfig --del portmap
#" #"
## use system default language
#> $MOUNTDIR/etc/sysconfig/i18n
# set localtime (default to Europe/Berlin)
case $LANGUAGE in
it) timezone=Europe/Rome ;;
es) timezone=Europe/Madrid ;;
*) timezone=Europe/Berlin ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp /usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# disable automatic depmod and ldconfig execution on boot (also due to clock error)
cat >> $MOUNTDIR/etc/sysconfig/rc << _EOF
no_auto_depmod=1
no_auto_ldconfig=1
_EOF
# configure touchscreen # configure touchscreen
cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
TSLIB_CONFFILE=/etc/ts.conf TSLIB_CONFFILE=/etc/ts.conf
@ -89,8 +71,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# remove some documentation to save space # remove some documentation to save space
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do

View File

@ -37,21 +37,6 @@
## use system default language ## use system default language
#> $MOUNTDIR/etc/sysconfig/i18n #> $MOUNTDIR/etc/sysconfig/i18n
# set localtime (default to Europe/Berlin)
case $LANGUAGE in
it) timezone=Europe/Rome ;;
es) timezone=Europe/Madrid ;;
*) timezone=Europe/Berlin ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp /usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# disable automatic depmod and ldconfig execution on boot (also due to clock error)
cat >> $MOUNTDIR/etc/sysconfig/rc << _EOF
no_auto_depmod=1
no_auto_ldconfig=1
_EOF
# configure touchscreen # configure touchscreen
cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
TSLIB_CONFFILE=/etc/ts.conf TSLIB_CONFFILE=/etc/ts.conf
@ -93,8 +78,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do for f in /usr/share/applications/chromium-devel.desktop /opt/kde/share/applications/kaffeine.desktop; do

View File

@ -34,8 +34,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;; es) timezone=Europe/Madrid ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu # configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do for f in /usr/share/applications/chromium-devel.desktop; do

View File

@ -34,8 +34,7 @@ case $LANGUAGE in
it) timezone=Europe/Rome ;; it) timezone=Europe/Rome ;;
*) timezone=UTC ;; *) timezone=UTC ;;
esac esac
echo $timezone > $MOUNTDIR/etc/timezone ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
prelink prelink