runtime:
KEYMAP - keyboard translation table loaded by loadkeys
+ KEYTABLE - base name for keyboard translation table; if UNICODE is
+ true, Unicode version will be loaded. Overrides KEYMAP.
EXT_KEYMAPS - list of extra keymaps to bo loaded (sep. by space)
UNICODE - boolean, indicating UTF-8 mode
FONT - console font
[ -f $I18N_CONF ] && . $I18N_CONF
[ -f $VCONFIG_CONF ] && . $VCONFIG_CONF
+ shopt -q -s nocasematch
+ if [[ ${UNICODE} ]]
+ then
+ if [[ ${UNICODE} = YES || ${UNICODE} = 1 ]]
+ then
+ UNICODE=1
+ elif [[ ${UNICODE} = NO || ${UNICODE} = 0 ]]
+ then
+ UNICODE=0
+ else
+ UNICODE=''
+ fi
+ fi
+ if [[ ! ${UNICODE} && ${LANG} =~ .*\.UTF-?8 ]]
+ then
+ UNICODE=1
+ fi
+ shopt -q -u nocasematch
+
# Gentoo user may have KEYMAP set to something like "-u pl2",
KEYMAP=${KEYMAP#-* }
+
+ # KEYTABLE is a bit special - it defines base keymap name and UNICODE
+ # determines whether non-UNICODE or UNICODE version is used
+
+ if [[ ${KEYTABLE} ]]; then
+ if [[ ${UNICODE} == 1 ]]; then
+ [[ ${KEYTABLE} =~ .*\.uni.* ]] || KEYTABLE=${KEYTABLE%.map*}.uni
+ fi
+ KEYMAP=${KEYTABLE}
+ fi
+
# I'm not sure of the purpose of UNIKEYMAP and GRP_TOGGLE. They were in
# original redhat-i18n module. Anyway it won't hurt.
EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE}
inst_simple ${kbddir}/unimaps/${FONT_UNIMAP}.uni
fi
- shopt -q -s nocasematch
- if [[ ${UNICODE} ]]
- then
- if [[ ${UNICODE} = YES || ${UNICODE} = 1 ]]
- then
- UNICODE=1
- elif [[ ${UNICODE} = NO || ${UNICODE} = 0 ]]
- then
- UNICODE=0
- else
- UNICODE=''
- fi
- fi
- if [[ ! ${UNICODE} && ${LANG} =~ .*\.UTF-?8 ]]
- then
- UNICODE=1
- fi
- shopt -q -u nocasematch
-
mksubdirs ${initdir}${I18N_CONF}
mksubdirs ${initdir}${VCONFIG_CONF}
print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}