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 ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# clean rpm database before doing other operations with internal rpm
# to fix cross x86/x86_64 installation error:

View File

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

View File

@ -34,8 +34,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu
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)
#
case $LANGUAGE in
if [ ! "$MULTILANGUAGE" ]; then
case $LANGUAGE in
it) timezone=Europe/Rome ;;
es) timezone=Europe/Madrid ;;
fr) timezone=Europe/Paris ;;
de) timezone=Europe/Berlin ;;
en) timezone=Europe/London ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
esac
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
fi
# configure favorites in kde menu
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 ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do

View File

@ -34,24 +34,6 @@
#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
cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
TSLIB_CONFFILE=/etc/ts.conf
@ -89,8 +71,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# remove some documentation to save space
for f in ChangeLog Changelog CHANGES TODO NEWS README README.txt; do

View File

@ -37,21 +37,6 @@
## 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
cat > $MOUNTDIR/etc/ts-calibrate.conf << _EOF
TSLIB_CONFFILE=/etc/ts.conf
@ -93,8 +78,7 @@ case $LANGUAGE in
es) timezone=Europe/Madrid ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu
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 ;;
*) timezone=UTC ;;
esac
echo $timezone > $MOUNTDIR/etc/timezone
cp $MOUNTDIR/usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
# configure favorites in kde menu
for f in /usr/share/applications/chromium-devel.desktop; do

View File

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