makedist.sh: configure i18n and kbd settings in /etc/locale.conf and /etc/vconsole.conf as required by dracut

This commit is contained in:
Silvan Calarco 2011-09-01 15:00:19 +02:00
parent a6db324f5a
commit 05d86fc992

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
# #