Harald Hoyer 308914
From de34ba76e579dd11202f632ecf8c625f841646e1 Mon Sep 17 00:00:00 2001
Harald Hoyer 308914
From: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Harald Hoyer 308914
Date: Sun, 19 Apr 2020 16:32:41 +0300
Harald Hoyer 308914
Subject: [PATCH] i18n: Always install /etc/vconsole.conf
Harald Hoyer 308914
Harald Hoyer 308914
/etc/vconsole.conf must be installed always, even in generic initrds, not only host-only ones.
Harald Hoyer 308914
systemd-vconsole-setup is run at initrd stage and expects either /etc/vconsole.conf or kernel cmdline options to exist.
Harald Hoyer 308914
Harald Hoyer 308914
I have also proposed a change in systemd-vconsole-setup that makes it behave better if /etc/vconsole.conf does not exist:
Harald Hoyer 308914
https://github.com/systemd/systemd/pull/15479
Harald Hoyer 308914
But it is just a fallback. If /etc/vconsole.conf does not exist in initrd and if that patch is applied on systemd,
Harald Hoyer 308914
then the default consoel font is set despite the one being set in /etc/vconsole.conf and this setting is inherited
Harald Hoyer 308914
when new TTYs are opened. This leads to full ignorance of settings in /etc/vconsole.conf.
Harald Hoyer 308914
It is incorrect, and that is why this file must be copied to initrds always, but not only on host-only initrds.
Harald Hoyer 308914
Harald Hoyer 308914
Fixes: https://github.com/dracutdevs/dracut/issues/796
Harald Hoyer 308914
Harald Hoyer 308914
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
Harald Hoyer 308914
---
Harald Hoyer 308914
 modules.d/10i18n/module-setup.sh | 9 ++++++---
Harald Hoyer 308914
 1 file changed, 6 insertions(+), 3 deletions(-)
Harald Hoyer 308914
Harald Hoyer 308914
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
Harald Hoyer 308914
index ba17e477..dd45b666 100755
Harald Hoyer 308914
--- a/modules.d/10i18n/module-setup.sh
Harald Hoyer 308914
+++ b/modules.d/10i18n/module-setup.sh
Harald Hoyer 308914
@@ -230,9 +230,7 @@ install() {
Harald Hoyer 308914
             print_vars LC_ALL LANG >> ${initdir}${I18N_CONF}
Harald Hoyer 308914
         fi
Harald Hoyer 308914
 
Harald Hoyer 308914
-        if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${VCONFIG_CONF} ]]; then
Harald Hoyer 308914
-            inst_simple ${VCONFIG_CONF}
Harald Hoyer 308914
-        else
Harald Hoyer 308914
+        if ! dracut_module_included "systemd"; then
Harald Hoyer 308914
             mksubdirs ${initdir}${VCONFIG_CONF}
Harald Hoyer 308914
             print_vars KEYMAP EXT_KEYMAPS UNICODE FONT FONT_MAP FONT_UNIMAP >> ${initdir}${VCONFIG_CONF}
Harald Hoyer 308914
         fi
Harald Hoyer 308914
@@ -263,6 +261,11 @@ install() {
Harald Hoyer 308914
     if checks; then
Harald Hoyer 308914
         install_base
Harald Hoyer 308914
 
Harald Hoyer 308914
+        # https://github.com/dracutdevs/dracut/issues/796
Harald Hoyer 308914
+        if dracut_module_included "systemd" && [[ -f $dracutsysrootdir${VCONFIG_CONF} ]]; then
Harald Hoyer 308914
+            inst_simple ${VCONFIG_CONF}
Harald Hoyer 308914
+        fi
Harald Hoyer 308914
+
Harald Hoyer 308914
         if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then
Harald Hoyer 308914
             install_local_i18n || install_all_kbd
Harald Hoyer 308914
         else
Harald Hoyer 308914