Backport from openmamba (devel): suport /etc/locale.conf and /etc/vconsole.conf

This commit is contained in:
Silvan Calarco 2011-09-04 17:18:47 +02:00
parent a51baf8de2
commit 806efeeaee

View File

@ -17,6 +17,39 @@ create_fstab "$ROOTDEV" "$ROOTFS"
install_rpms "filesystem gzip texinfo ldconfig bash libreadline glibc libncurses initscripts setup coreutils chkconfig libattr libstdc++6" "--nodeps --noorder --noscripts" install_rpms "filesystem gzip texinfo ldconfig bash libreadline glibc libncurses initscripts setup coreutils chkconfig libattr libstdc++6" "--nodeps --noorder --noscripts"
[ "$LANGUAGE" ] && {
[ "$LANGUAGE" = "en" ] && KEYMAP=us || KEYMAP="$LANGUAGE"
# configure localization
cat > $MOUNTDIR/etc/vconsole.conf << _EOF
KEYMAP=$KEYMAP
FONT=lat9w-16
FONT_MAP=8859-1_to_uni
FONT_UNIMAP=
_EOF
# legacy
cat > $MOUNTDIR/etc/sysconfig/keyboard << _EOF
KEYMAP=$KEYMAP.map
XKB_LAYOUT=$KEYMAP
XKB_MODEL=pc105
XKB_OPTIONS=
_EOF
[ "$COUNTRY" ] && {
cat > $MOUNTDIR/etc/locale.conf << _EOF
LANG=${LANGUAGE}_${COUNTRY}.UTF-8
LC_COLLATE=C
_EOF
# legacy
cat > $MOUNTDIR/etc/sysconfig/i18n << _EOF
LANG=${LANGUAGE}_${COUNTRY}.UTF-8
_EOF
}
}
# Workaround: avoid a circular dependency with bash # Workaround: avoid a circular dependency with bash
INSTALLED="texinfo" INSTALLED="texinfo"
@ -78,26 +111,6 @@ fi
# erase_rpm_database # erase_rpm_database
clean_rpm_database clean_rpm_database
[ "$LANGUAGE" ] && {
[ "$LANGUAGE" = "en" ] && KEYMAP=us || KEYMAP="$LANGUAGE"
# configure localization
cat > $MOUNTDIR/etc/sysconfig/keyboard << _EOF
KEYMAP=$KEYMAP.map
XKB_LAYOUT=$KEYMAP
XKB_MODEL=pc105
XKB_OPTIONS=
_EOF
[ "$COUNTRY" ] && {
cat > $MOUNTDIR/etc/sysconfig/i18n << _EOF
LANG=${LANGUAGE}_${COUNTRY}.UTF-8
_EOF
}
}
echo "Deleting unneeded files..." echo "Deleting unneeded files..."
# delete unused localizations # delete unused localizations
# #
@ -105,7 +118,6 @@ find $MOUNTDIR/usr/share/locale \
-maxdepth 1 -mindepth 1 -type d \ -maxdepth 1 -mindepth 1 -type d \
! -name it* ! -name en* ! -name C ! -name l10n -exec rm -rf {} \; ! -name it* ! -name en* ! -name C ! -name l10n -exec rm -rf {} \;
#$CHROOTCMD chkconfig --add acpid || #$CHROOTCMD chkconfig --add acpid ||
# { echo "$mkcd_me: fatal error, aborting installation" >&2 # { echo "$mkcd_me: fatal error, aborting installation" >&2
# { (exit 1); exit 1; }; } # { (exit 1); exit 1; }; }