-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sys-apps/systemd: sys-kernel/dracut: fix systemd-vconsole-setup run
systemd-vconsole-setup needs the dracut i18n module so that the binary loadkeys is present. The binary loadkeys comes from the kbd package. A custom dracut module patch for i18n was created, so that only the default `us` keymap and font are installed, leading the size increase to the minimum of around a few KB instead of 3MB. Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com>
- Loading branch information
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...y/sys-kernel/dracut/files/0001-systemd-initrd-install-only-keymap-required-by-syste.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From 6d7e4b88c21f45cf1695e4495004a12cacd58d0c Mon Sep 17 00:00:00 2001 | ||
From: Adrian Vladu <avladu@cloudbasesolutions.com> | ||
Date: Thu, 7 Mar 2024 11:17:54 +0000 | ||
Subject: [PATCH] systemd: initrd: install only keymap required by | ||
systemd-vconsole-setup | ||
|
||
Signed-off-by: Adrian Vladu <avladu@cloudbasesolutions.com> | ||
--- | ||
modules.d/10i18n/module-setup.sh | 13 +++++++------ | ||
1 file changed, 7 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh | ||
index d6688b47..516883be 100755 | ||
--- a/modules.d/10i18n/module-setup.sh | ||
+++ b/modules.d/10i18n/module-setup.sh | ||
@@ -4,7 +4,7 @@ | ||
check() { | ||
[[ "$mount_needs" ]] && return 1 | ||
|
||
- require_binaries setfont loadkeys kbd_mode || return 1 | ||
+ require_binaries loadkeys || return 1 | ||
|
||
return 0 | ||
} | ||
@@ -164,6 +164,10 @@ install() { | ||
fi | ||
shopt -q -u nocasematch | ||
|
||
+ # install only one keymap: us | ||
+ KEYMAP=us | ||
+ | ||
+ | ||
# Gentoo user may have KEYMAP set to something like "-u pl2", | ||
KEYMAP=${KEYMAP#-* } | ||
|
||
@@ -267,10 +271,7 @@ install() { | ||
inst_simple ${VCONFIG_CONF} | ||
fi | ||
|
||
- if [[ ${hostonly} ]] && ! [[ ${i18n_install_all} == "yes" ]]; then | ||
- install_local_i18n || install_all_kbd | ||
- else | ||
- install_all_kbd | ||
- fi | ||
+ # install only one keyboard map | ||
+ install_local_i18n | ||
fi | ||
} | ||
-- | ||
2.43.0 | ||
|