Centralize localtime setting from paltforms to main makedist.inc.sh
Also added configuration for calamares (maybe will move this to calamares script next)
This commit is contained in:
parent
ce9d14ac4b
commit
16127b652d
@ -85,6 +85,19 @@ fi
|
|||||||
|
|
||||||
echo "$TARGET_HOSTNAME.$TARGET_DOMAIN" > $MOUNTDIR/etc/hostname
|
echo "$TARGET_HOSTNAME.$TARGET_DOMAIN" > $MOUNTDIR/etc/hostname
|
||||||
|
|
||||||
|
# set timezone according to LANGUAGE (default is UTC)
|
||||||
|
if [ ! "$MULTILANGUAGE" ]; then
|
||||||
|
case $LANGUAGE in
|
||||||
|
de) region="Europe"; zone="Berlin" ;;
|
||||||
|
it) region="Europe"; zone="Rome" ;;
|
||||||
|
es) region="Europe"; zone="Madrid" ;;
|
||||||
|
fi) region="Europe"; zone="Paris" ;;
|
||||||
|
*) region="Europe"; zone="London" ;;
|
||||||
|
esac
|
||||||
|
timezone="$region/$zone"
|
||||||
|
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$PREPLATFORM_TARGET" ]; then
|
if [ "$PREPLATFORM_TARGET" ]; then
|
||||||
install_rpms_by_target "Installing ${PLATFORM} pre-platform workaround packages" ${MAKEDIST_TARGET}-${PREPLATFORM_TARGET} "${RPMEXTRAARGS}"
|
install_rpms_by_target "Installing ${PLATFORM} pre-platform workaround packages" ${MAKEDIST_TARGET}-${PREPLATFORM_TARGET} "${RPMEXTRAARGS}"
|
||||||
fi
|
fi
|
||||||
@ -118,6 +131,23 @@ ONBOOT=yes
|
|||||||
_EOF
|
_EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# configure calamares installer if present
|
||||||
|
if [ ! "$MULTILANGUAGE" ]; then
|
||||||
|
if [ -e $MOUNTDIR/etc/calamares/modules/locale.conf ]; then
|
||||||
|
sed -i "s|^region:.*|region: \"$region\"|" $MOUNTDIR/etc/calamares/modules/locale.conf
|
||||||
|
sed -i "s|^zone:.*|zone: \"$zone\"|" $MOUNTDIR/etc/calamares/modules/locale.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -e $MOUNTDIR/etc/calamares/branding/openmamba/branding.desc ]; then
|
||||||
|
(
|
||||||
|
. $MOUNTDIR/etc/os-release
|
||||||
|
sed -i "s|\(version:[ \t]*\).*|\1$VERSION|" $MOUNTDIR/etc/calamares/branding/openmamba/branding.desc
|
||||||
|
sed -i "s|\(shortVersion:[ \t]*\).*|\1$VERSION_ID|" $MOUNTDIR/etc/calamares/branding/openmamba/branding.desc
|
||||||
|
sed -i "s|\(versionedName:[ \t]*\).*|\1$PRETTY_NAME|" $MOUNTDIR/etc/calamares/branding/openmamba/branding.desc
|
||||||
|
sed -i "s|\(shortVersionedName:[ \t]*\).*|\1$ID $VERSION_ID|" $MOUNTDIR/etc/calamares/branding/openmamba/branding.desc
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
# delete unused localizations
|
# delete unused localizations
|
||||||
#
|
#
|
||||||
if [ ! "$MULTILANGUAGE" ]; then
|
if [ ! "$MULTILANGUAGE" ]; then
|
||||||
|
@ -16,15 +16,6 @@ chroot $MOUNTDIR gtk-update-icon-cache /usr/share/icons/hicolor
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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:
|
||||||
# error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found
|
# error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found
|
||||||
|
@ -5,15 +5,6 @@ sed -i "s|# autologin.*|autologin=liveuser|" $MOUNTDIR/etc/lxdm/lxdm.conf
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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:
|
||||||
# error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found
|
# error: db4 error(-30986) from dbcursor->get: DB_PAGE_NOTFOUND: Requested page not found
|
||||||
|
@ -12,15 +12,6 @@ fi
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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
|
||||||
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f || exit 1
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f || exit 1
|
||||||
|
@ -12,20 +12,6 @@ fi
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
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
|
|
||||||
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
|
||||||
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
||||||
|
@ -12,15 +12,6 @@ fi
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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
|
||||||
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
||||||
|
@ -48,15 +48,6 @@ _EOF
|
|||||||
#
|
#
|
||||||
sed -i "s|# autologin.*|autologin=liveuser|" $MOUNTDIR/etc/lxdm/lxdm.conf
|
sed -i "s|# autologin.*|autologin=liveuser|" $MOUNTDIR/etc/lxdm/lxdm.conf
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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
|
||||||
find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \;
|
find $MOUNTDIR/usr/share/doc -name $f -exec rm -f {} \;
|
||||||
|
@ -55,15 +55,6 @@ if [ -e $MOUNTDIR/opt/kde/share/config/kdm/kdmrc ]; then
|
|||||||
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
|
$MOUNTDIR/opt/kde/share/config/kdm/kdmrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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
|
||||||
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
||||||
|
@ -12,15 +12,6 @@ fi
|
|||||||
# FIXME: ensure alternatives are correclty set
|
# FIXME: ensure alternatives are correclty set
|
||||||
chroot $MOUNTDIR update-alternatives-set-dri
|
chroot $MOUNTDIR update-alternatives-set-dri
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
es) timezone=Europe/Madrid ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../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
|
||||||
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
chroot $MOUNTDIR /opt/kde/bin/kickoffcfg --add-favorite $f
|
||||||
|
@ -28,14 +28,6 @@ mv $MOUNTDIR/etc/shadow $MOUNTDIR/etc/shadow.preinst
|
|||||||
cat $MOUNTDIR/etc/shadow.tmp $MOUNTDIR/etc/shadow.orig > $MOUNTDIR/etc/shadow
|
cat $MOUNTDIR/etc/shadow.tmp $MOUNTDIR/etc/shadow.orig > $MOUNTDIR/etc/shadow
|
||||||
rm -f $MOUNTDIR/etc/shadow.tmp $MOUNTDIR/etc/shadow.orig
|
rm -f $MOUNTDIR/etc/shadow.tmp $MOUNTDIR/etc/shadow.orig
|
||||||
|
|
||||||
# set timezone according to LANGUAGE (default is UTC)
|
|
||||||
#
|
|
||||||
case $LANGUAGE in
|
|
||||||
it) timezone=Europe/Rome ;;
|
|
||||||
*) timezone=UTC ;;
|
|
||||||
esac
|
|
||||||
ln -s ../usr/share/zoneinfo/$timezone $MOUNTDIR/etc/localtime
|
|
||||||
|
|
||||||
prelink
|
prelink
|
||||||
|
|
||||||
extlinux --install $MOUNTDIR/boot
|
extlinux --install $MOUNTDIR/boot
|
||||||
|
Loading…
Reference in New Issue
Block a user