i18n: move to vconfig.* and locale.* namespace
parent
9b79345001
commit
ee6fa3240d
|
|
@ -2,5 +2,4 @@
|
||||||
# Dracut config file customized for RedHat/Fedora.
|
# Dracut config file customized for RedHat/Fedora.
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
keyboard_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
|
i18n_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP /etc/sysconfig/i18n:FONT,FONTACM-FONT_MAP,FONT_UNIMAP"
|
||||||
i18n_vars="/etc/sysconfig/i18n:SYSFONT,SYSFONTACM-CONTRANS,UNIMAP"
|
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
keyboard_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS"
|
i18n_vars="/etc/conf.d/keymaps:keymap-KEYMAP,extended_keymaps-EXT_KEYMAPS /etc/conf.d/consolefont:consolefont-FONT,consoletranslation-FONT_MAP /etc/rc.conf:unicode-UNICODE"
|
||||||
i18n_vars="/etc/conf.d/consolefont:consolefont-SYSFONT,consoletranslation-CONTRANS /etc/rc.conf:unicode-UNICODE"
|
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
keyboard_vars="/etc/conf.d/keymaps:KEYMAP,EXTENDED_KEYMAPS-EXT_KEYMAPS"
|
i18n_vars="/etc/conf.d/keymaps:KEYMAP,EXTENDED_KEYMAPS-EXT_KEYMAPS /etc/conf.d/consolefont:CONSOLEFONT-FONT,CONSOLETRANSLATION-FONT_MAP /etc/rc.conf:UNICODE"
|
||||||
i18n_vars="/etc/conf.d/consolefont:CONSOLEFONT-SYSFONT,CONSOLETRANSLATION-CONTRANS /etc/rc.conf:UNICODE"
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-UNIMAP,CONSOLE_FONT-SYSFONT,CONSOLE_SCREENMAP-CONTRANS"
|
i18n_vars="/etc/sysconfig/language:RC_LANG-LANG,RC_LC_ALL-LC_ALL /etc/sysconfig/console:CONSOLE_UNICODEMAP-FONT_UNIMAP,CONSOLE_FONT-FONT,CONSOLE_SCREENMAP-FONT_MAP /etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
|
||||||
keyboard_vars="/etc/sysconfig/keyboard:KEYTABLE-KEYMAP"
|
|
||||||
|
|
||||||
omit_dracutmodules+=" selinux "
|
omit_dracutmodules+=" selinux "
|
||||||
hostonly="yes"
|
hostonly="yes"
|
||||||
|
|
|
||||||
|
|
@ -177,74 +177,74 @@ This parameter can be specified multiple times.</para>
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>KEYMAP=</envar>
|
<envar>voonsole.keymap=</envar>
|
||||||
<replaceable><keymap base file name></replaceable>
|
<replaceable><keymap base file name></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>keyboard translation table loaded by loadkeys; taken from keymaps directory; will be written to <filename>/etc/sysconfig/keyboard</filename> in the initramfs, e.g.: <programlisting>KEYMAP=de-latin1-nodeadkeys</programlisting></para>
|
<para>keyboard translation table loaded by loadkeys; taken from keymaps directory; will be written as <envar>KEYMAP</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs, e.g.: <programlisting>vconsole.keymap=de-latin1-nodeadkeys</programlisting></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>EXT_KEYMAPS=</envar>
|
<envar>vconsole.keymap.ext=</envar>
|
||||||
<replaceable><list of keymap base file names></replaceable>
|
<replaceable><list of keymap base file names></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>list of extra keymaps to bo loaded (sep. by space); will be written to <filename>/etc/sysconfig/keyboard</filename> in the initramfs</para>
|
<para>list of extra keymaps to bo loaded (sep. by space); will be written as <envar>EXT_KEYMAP</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>UNICODE=</envar>
|
<envar>vconsole.font.unicode=</envar>
|
||||||
<replaceable><1|0></replaceable>
|
<replaceable><1|0></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>boolean, indicating UTF-8 mode; will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs</para>
|
<para>boolean, indicating UTF-8 mode; will be written as <envar>UNICODE</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>SYSFONT=</envar>
|
<envar>vconsole.font=</envar>
|
||||||
<replaceable><font base file name></replaceable>
|
<replaceable><font base file name></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>console font; taken from consolefonts directory; will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs; e.g.: <programlisting>SYSFONT=LatArCyrHeb-16</programlisting></para>
|
<para>console font; taken from consolefonts directory; will be written as <envar>FONT</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs; e.g.: <programlisting>vconsole.font=LatArCyrHeb-16</programlisting></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>CONTRANS=</envar>
|
<envar>vconsole.font.map=</envar>
|
||||||
<replaceable><console map base file name></replaceable>
|
<replaceable><console map base file name></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>see description of '-m' parameter in setfont manual; taken from consoletrans directory; will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs</para>
|
<para>see description of '-m' parameter in setfont manual; taken from consoletrans directory; will be written as <envar>FONT_MAP</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>UNIMAP=</envar>
|
<envar>vconsole.font.unimap=</envar>
|
||||||
<replaceable><unicode table base file name></replaceable>
|
<replaceable><unicode table base file name></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>see description of '-u' parameter in setfont manual; taken from unimaps directory; will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs</para>
|
<para>see description of '-u' parameter in setfont manual; taken from unimaps directory; will be written as <envar>FONT_UNIMAP</envar> to <filename>/etc/vconsole.conf</filename> in the initramfs</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>LANG=</envar>
|
<envar>locale.LANG=</envar>
|
||||||
<replaceable><locale></replaceable>
|
<replaceable><locale></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>taken from the environment; if no UNICODE is defined we set its value in basis of LANG value (whether it ends with ".utf8" (or similar) or not); will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs; e.g.: <programlisting>LANG=pl_PL.utf8</programlisting></para>
|
<para>taken from the environment; if no UNICODE is defined we set its value in basis of LANG value (whether it ends with ".utf8" (or similar) or not); will be written as <envar>LANG</envar> to <filename>/etc/locale.conf</filename> in the initramfs; e.g.: <programlisting>locale.LANG=pl_PL.utf8</programlisting></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<envar>LC_ALL=</envar>
|
<envar>locale.LC_ALL=</envar>
|
||||||
<replaceable><locale></replaceable>
|
<replaceable><locale></replaceable>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>taken from the environment; will be written to <filename>/etc/sysconfig/i18n</filename> in the initramfs</para>
|
<para>taken from the environment; will be written as <envar>LC_ALL</envar> to <filename>/etc/locale.conf</filename> in the initramfs</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
@ -1063,6 +1063,62 @@ rd_ZNET=ctc,0.0.0600,0.0.0601,0.0.0602,protocol=bar</programlisting></para>
|
||||||
<para><envar>rd.zfcp</envar></para>
|
<para><envar>rd.zfcp</envar></para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>KEYMAP</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.keymap</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>KEYTABLE</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.keymap</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>SYSFONT</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.font</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>CONTRANS</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.font.map</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>UNIMAP</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.font.unimap</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>UNICODE</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.font.unicode</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
<envar>EXT_KEYMAP</envar>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para><envar>vconsole.keymap.ext</envar></para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect2>
|
</refsect2>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
# Console initialization - keyboard, font, etc.
|
# Console initialization - keyboard, font, etc.
|
||||||
KERNEL=="tty0", RUN+="/lib/udev/console_init %k"
|
KERNEL=="tty0", RUN+="/lib/udev/console_init $root/$name"
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,9 @@ runtime:
|
||||||
KEYMAP - keyboard translation table loaded by loadkeys
|
KEYMAP - keyboard translation table loaded by loadkeys
|
||||||
EXT_KEYMAPS - list of extra keymaps to bo loaded (sep. by space)
|
EXT_KEYMAPS - list of extra keymaps to bo loaded (sep. by space)
|
||||||
UNICODE - boolean, indicating UTF-8 mode
|
UNICODE - boolean, indicating UTF-8 mode
|
||||||
SYSFONT - console font
|
FONT - console font
|
||||||
CONTRANS - see description of '-m' parameter in setfont manual
|
FONT_MAP - see description of '-m' parameter in setfont manual
|
||||||
UNIMAP - see description of '-u' parameter in setfont manual
|
FONT_UNIMAP - see description of '-u' parameter in setfont manual
|
||||||
|
|
||||||
The following are appended to EXT_KEYMAPS only during build time:
|
The following are appended to EXT_KEYMAPS only during build time:
|
||||||
|
|
||||||
|
|
@ -72,11 +72,9 @@ used on the basis of LANG value (if it ends with ".utf8" or similar).
|
||||||
|
|
||||||
Mappings between variables listed in 2.1. and the ones spread around
|
Mappings between variables listed in 2.1. and the ones spread around
|
||||||
your system are set up in /etc/dracut.conf.d/<foo>.conf. You need to
|
your system are set up in /etc/dracut.conf.d/<foo>.conf. You need to
|
||||||
assign mappings to fields keyboard_vars and i18n_vars. Here's an
|
assign mappings to i18n_vars. Here's an example:
|
||||||
example:
|
|
||||||
|
|
||||||
keyboard_vars="/etc/conf.d/keymaps:KEYMAP,EXTENDED_KEYMAPS-EXT_KEYMAPS"
|
i18n_vars="/etc/conf.d/keymaps:KEYMAP,EXTENDED_KEYMAPS-EXT_KEYMAPS /etc/conf.d/consolefont:CONSOLEFONT-FONT,CONSOLETRANSLATION-FONT_MAP /etc/rc.conf:UNICODE"
|
||||||
i18n_vars="/etc/conf.d/consolefont:CONSOLEFONT-SYSFONT,CONSOLETRANSLATION-CONTRANS /etc/rc.conf:UNICODE"
|
|
||||||
|
|
||||||
First we've got name of file in host file system tree. After colon
|
First we've got name of file in host file system tree. After colon
|
||||||
there's mapping: <from>-<to>. If both variables have the same name you
|
there's mapping: <from>-<to>. If both variables have the same name you
|
||||||
|
|
@ -121,4 +119,4 @@ file (the same where you put mappings).
|
||||||
|
|
||||||
If you create generic initramfs you can set up i18n by kernel
|
If you create generic initramfs you can set up i18n by kernel
|
||||||
parameters using variables listed in 2.1. (except of UNIKEYMAP
|
parameters using variables listed in 2.1. (except of UNIKEYMAP
|
||||||
and GRP_TOGGLE) The recommended minimum is: SYSFONT, KEYMAP and UNICODE.
|
and GRP_TOGGLE) The recommended minimum is: FONT and KEYMAP.
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,11 @@
|
||||||
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
[ -e /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
|
[ -e /etc/vconsole.conf ] && . /etc/vconsole.conf
|
||||||
[ -e /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard
|
|
||||||
|
|
||||||
DEFAULT_SYSFONT=LatArCyrHeb-16
|
DEFAULT_SYSFONT=LatArCyrHeb-16
|
||||||
DEFAULT_KEYMAP=/etc/sysconfig/console/default.kmap
|
DEFAULT_KEYMAP=/etc/sysconfig/console/default.kmap
|
||||||
|
|
||||||
|
|
||||||
set_keyboard() {
|
set_keyboard() {
|
||||||
local param
|
local param
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,9 @@
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
|
KBDSUBDIRS=consolefonts,consoletrans,keymaps,unimaps
|
||||||
DEFAULT_SYSFONT=LatArCyrHeb-16
|
DEFAULT_FONT=LatArCyrHeb-16
|
||||||
I18N_CONF="${initdir}/etc/sysconfig/i18n"
|
I18N_CONF="${initdir}/etc/locale.conf"
|
||||||
KEYBOARD_CONF="${initdir}/etc/sysconfig/keyboard"
|
KEYBOARD_CONF="${initdir}/etc/vconsole.conf"
|
||||||
|
|
||||||
|
|
||||||
# This is from 10redhat-i18n.
|
# This is from 10redhat-i18n.
|
||||||
findkeymap () {
|
findkeymap () {
|
||||||
|
|
@ -73,7 +72,14 @@ gather_vars() {
|
||||||
|
|
||||||
install_base() {
|
install_base() {
|
||||||
dracut_install setfont loadkeys kbd_mode stty
|
dracut_install setfont loadkeys kbd_mode stty
|
||||||
inst ${moddir}/console_init /lib/udev/console_init
|
|
||||||
|
if [ -x /lib/systemd/systemd-vconsole-setup ]; then
|
||||||
|
dracut_install /lib/systemd/systemd-vconsole-setup
|
||||||
|
inst_dir /lib/udev
|
||||||
|
ln -s /lib/systemd/systemd-vconsole-setup "${initdir}/lib/udev/console_init"
|
||||||
|
else
|
||||||
|
inst ${moddir}/console_init /lib/udev/console_init
|
||||||
|
fi
|
||||||
inst_rules ${moddir}/10-console.rules
|
inst_rules ${moddir}/10-console.rules
|
||||||
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
inst_hook cmdline 20 "${moddir}/parse-i18n.sh"
|
||||||
}
|
}
|
||||||
|
|
@ -94,10 +100,16 @@ install_all_kbd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
install_local_keyboard() {
|
install_local_keyboard() {
|
||||||
local map
|
|
||||||
|
|
||||||
eval $(gather_vars ${keyboard_vars})
|
eval $(gather_vars ${keyboard_vars})
|
||||||
|
|
||||||
|
mksubdirs ${KEYBOARD_CONF}
|
||||||
|
}
|
||||||
|
|
||||||
|
install_local_i18n() {
|
||||||
|
local map
|
||||||
|
eval $(gather_vars ${i18n_vars})
|
||||||
|
|
||||||
# Gentoo user may have KEYMAP set to something like "-u pl2",
|
# Gentoo user may have KEYMAP set to something like "-u pl2",
|
||||||
KEYMAP=${KEYMAP#-* }
|
KEYMAP=${KEYMAP#-* }
|
||||||
# I'm not sure of the purpose of UNIKEYMAP and GRP_TOGGLE. They were in
|
# I'm not sure of the purpose of UNIKEYMAP and GRP_TOGGLE. They were in
|
||||||
|
|
@ -115,27 +127,20 @@ install_local_keyboard() {
|
||||||
|
|
||||||
inst_opt_decompress ${KEYMAPS}
|
inst_opt_decompress ${KEYMAPS}
|
||||||
|
|
||||||
mksubdirs ${KEYBOARD_CONF}
|
[[ ${FONT} ]] || FONT=${DEFAULT_FONT}
|
||||||
print_vars KEYMAP EXT_KEYMAPS >> ${KEYBOARD_CONF}
|
FONT=${FONT%.psf*}
|
||||||
}
|
inst_opt_decompress ${kbddir}/consolefonts/${FONT}.*
|
||||||
|
|
||||||
install_local_i18n() {
|
if [[ ${FONT_MAP} ]]
|
||||||
eval $(gather_vars ${i18n_vars})
|
|
||||||
|
|
||||||
[[ ${SYSFONT} ]] || SYSFONT=${DEFAULT_SYSFONT}
|
|
||||||
SYSFONT=${SYSFONT%.psf*}
|
|
||||||
inst_opt_decompress ${kbddir}/consolefonts/${SYSFONT}.*
|
|
||||||
|
|
||||||
if [[ ${CONTRANS} ]]
|
|
||||||
then
|
then
|
||||||
CONTRANS=${CONTRANS%.trans}
|
FONT_MAP=${FONT_MAP%.trans}
|
||||||
inst ${kbddir}/consoletrans/${CONTRANS}.trans
|
inst ${kbddir}/consoletrans/${FONT_MAP}.trans
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${UNIMAP} ]]
|
if [[ ${FONT_UNIMAP} ]]
|
||||||
then
|
then
|
||||||
UNIMAP=${UNIMAP%.uni}
|
FONT_UNIMAP=${FONT_UNIMAP%.uni}
|
||||||
inst ${kbddir}/unimaps/${UNIMAP}.uni
|
inst ${kbddir}/unimaps/${FONT_UNIMAP}.uni
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${UNICODE} ]]
|
if [[ ${UNICODE} ]]
|
||||||
|
|
@ -156,7 +161,9 @@ install_local_i18n() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mksubdirs ${I18N_CONF}
|
mksubdirs ${I18N_CONF}
|
||||||
print_vars LC_ALL LANG UNICODE SYSFONT CONTRANS UNIMAP >> ${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}
|
||||||
}
|
}
|
||||||
|
|
||||||
checks() {
|
checks() {
|
||||||
|
|
@ -176,8 +183,8 @@ checks() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ ! ${hostonly} || ${keyboard_vars} && ${i18n_vars} ]] || {
|
[[ ! ${hostonly} || ${i18n_vars} ]] || {
|
||||||
derror 'Please set up keyboard_vars and i18n_vars in configuration file.'
|
derror 'Please set up i18n_vars in configuration file.'
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -189,7 +196,6 @@ then
|
||||||
|
|
||||||
if [[ ${hostonly} ]]
|
if [[ ${hostonly} ]]
|
||||||
then
|
then
|
||||||
install_local_keyboard
|
|
||||||
install_local_i18n
|
install_local_i18n
|
||||||
else
|
else
|
||||||
install_all_kbd
|
install_all_kbd
|
||||||
|
|
|
||||||
|
|
@ -3,24 +3,30 @@
|
||||||
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
|
||||||
inst_key_val() {
|
inst_key_val() {
|
||||||
local value
|
local _value
|
||||||
value=$(getarg $1)
|
local _file
|
||||||
[ -n "${value}" ] && printf '%s="%s"\n' $1 ${value} >> $2
|
_file=$1
|
||||||
|
shift
|
||||||
|
_value=$(getarg $@)
|
||||||
|
if [ -n "${_value}" ]; then
|
||||||
|
printf '%s="%s"\n' $1 ${_value} >> $_file
|
||||||
|
fi
|
||||||
|
unset _file
|
||||||
|
unset _value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inst_key_val /etc/vconsole.conf KEYMAP vconsole.keymap KEYTABLE
|
||||||
|
inst_key_val /etc/vconsole.conf FONT vconsole.font SYSFONT
|
||||||
|
inst_key_val /etc/vconsole.conf FONT_MAP vconsole.font.map CONTRANS
|
||||||
|
inst_key_val /etc/vconsole.conf FONT_UNIMAP vconsole.font.unimap UNIMAP
|
||||||
|
inst_key_val /etc/vconsole.conf UNICODE vconsole.font.unicode
|
||||||
|
inst_key_val /etc/vconsole.conf EXT_KEYMAP vconsole.keymap.ext
|
||||||
|
|
||||||
mkdir -p /etc/sysconfig
|
inst_key_val /etc/locale.conf LANG locale.LANG
|
||||||
inst_key_val KEYMAP /etc/sysconfig/keyboard
|
inst_key_val /etc/locale.conf LC_ALL locale.LC_ALL
|
||||||
inst_key_val EXT_KEYMAPS /etc/sysconfig/keyboard
|
|
||||||
inst_key_val UNICODE /etc/sysconfig/i18n
|
|
||||||
inst_key_val SYSFONT /etc/sysconfig/i18n
|
|
||||||
inst_key_val CONTRANS /etc/sysconfig/i18n
|
|
||||||
inst_key_val UNIMAP /etc/sysconfig/i18n
|
|
||||||
inst_key_val LANG /etc/sysconfig/i18n
|
|
||||||
inst_key_val LC_ALL /etc/sysconfig/i18n
|
|
||||||
|
|
||||||
if [ -f /etc/sysconfig/i18n ]; then
|
if [ -f /etc/locale.conf ]; then
|
||||||
. /etc/sysconfig/i18n
|
. /etc/locale.conf
|
||||||
export LANG
|
export LANG
|
||||||
export LC_ALL
|
export LC_ALL
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue