commit:     f492e244b60324fac15d7a8f6e74b4a022bdd3bd
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 13 18:55:21 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Mar 14 19:33:57 2021 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=f492e244

initrd.scripts: setup_keymap(): Skip keymap loading for serial consoles

Bug: https://bugs.gentoo.org/222699
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 defaults/initrd.scripts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index 505ca02..55fe73f 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1417,6 +1417,13 @@ cmdline_hwopts() {
 }
 
 setup_keymap() {
+       local console=$(get_active_console)
+       if echo "${console}" | grep -qF 'ttyS'
+       then
+               warn_msg "Active console is ${console}; Skipping dokeymap ..."
+               return
+       fi
+
        if [ "${DO_keymap}" ]
        then
                if [ ! -e /dev/vc/0 -a ! -e /dev/tty0 ]

Reply via email to