]> git.ipfire.org Git - thirdparty/dracut.git/blob - modules.d/10i18n/parse-i18n.sh
942719476f37543fe168c7e9931fc912b45d4964
[thirdparty/dracut.git] / modules.d / 10i18n / parse-i18n.sh
1 #!/bin/sh
2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
4
5 inst_key_val() {
6 local _value
7 local _file
8 local _default
9 _default=$1
10 shift
11 _file=$1
12 shift
13 _value=$(getarg $@)
14 [ -z "${_value}" ] && _value=$_default
15 if [ -n "${_value}" ]; then
16 printf '%s="%s"\n' $2 ${_value} >> $_file
17 fi
18 unset _file
19 unset _value
20 }
21
22 inst_key_val '' /etc/vconsole.conf vconsole.keymap KEYMAP -d KEYTABLE
23 inst_key_val '' /etc/vconsole.conf vconsole.font FONT -d SYSFONT
24 inst_key_val '' /etc/vconsole.conf vconsole.font.map FONT_MAP -d CONTRANS
25 inst_key_val '' /etc/vconsole.conf vconsole.font.unimap FONT_UNIMAP -d UNIMAP
26 inst_key_val 1 /etc/vconsole.conf vconsole.font.unicode UNICODE vconsole.unicode
27 inst_key_val '' /etc/vconsole.conf vconsole.keymap.ext EXT_KEYMAP
28
29 inst_key_val '' /etc/locale.conf locale.LANG LANG
30 inst_key_val '' /etc/locale.conf locale.LC_ALL LC_ALL
31
32 if [ -f /etc/locale.conf ]; then
33 . /etc/locale.conf
34 export LANG
35 export LC_ALL
36 fi
37
38 if [ -n "$DRACUT_SYSTEMD" ]; then
39 rm -f /etc/udev/rules.d/10-console.rules
40 rm -f /lib/udev/rules.d/10-console.rules
41 rm -f /lib/udev/console_init
42 fi