From 13f91fc78d50f3cc7eba71e114fdff76f6f76476 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 29 Oct 2010 13:55:22 +0200 Subject: [PATCH] i18n/install: cleanup and honor new config files honor local /etc/locale.conf and /etc/vconsole.conf files --- modules.d/10i18n/install | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/modules.d/10i18n/install b/modules.d/10i18n/install index 2b26358ca..42f49aed4 100755 --- a/modules.d/10i18n/install +++ b/modules.d/10i18n/install @@ -4,8 +4,8 @@ KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps DEFAULT_FONT=LatArCyrHeb-16 -I18N_CONF="${initdir}/etc/locale.conf" -KEYBOARD_CONF="${initdir}/etc/vconsole.conf" +I18N_CONF="/etc/locale.conf" +VCONFIG_CONF="/etc/vconsole.conf" # This is from 10redhat-i18n. findkeymap () { @@ -99,16 +99,12 @@ install_all_kbd() { dracut_install gzip bzip2 } -install_local_keyboard() { - - eval $(gather_vars ${keyboard_vars}) - - mksubdirs ${KEYBOARD_CONF} -} - install_local_i18n() { local map + eval $(gather_vars ${i18n_vars}) + [ -f $I18N_CONF ] && . $I18N_CONF + [ -f $VCONFIG_CONF ] && . $VCONFIG_CONF # Gentoo user may have KEYMAP set to something like "-u pl2", KEYMAP=${KEYMAP#-* } @@ -160,10 +156,10 @@ install_local_i18n() { UNICODE=1 fi - mksubdirs ${I18N_CONF} - mksubdirs ${KEYBOARD_CONF} - print_vars LC_ALL LANG >> ${I18N_CONF} - print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${KEYBOARD_CONF} + mksubdirs ${initdir}${I18N_CONF} + mksubdirs ${initdir}${VCONFIG_CONF} + print_vars LC_ALL LANG >> ${initdir}${I18N_CONF} + print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF} } checks() { @@ -183,6 +179,7 @@ checks() { return 1 } + [[ -f $I18N_CONF && -f $VCONFIG_CONF ]] || \ [[ ! ${hostonly} || ${i18n_vars} ]] || { derror 'Please set up i18n_vars in configuration file.' return 1 -- 2.47.3