diff --git a/makedist.inc.sh b/makedist.inc.sh index 3b4356e..795d928 100644 --- a/makedist.inc.sh +++ b/makedist.inc.sh @@ -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" +[ "$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 INSTALLED="texinfo" @@ -78,26 +111,6 @@ fi # erase_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..." # delete unused localizations #