Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > 71a1ba4a20ff0a01d79300b8413dde5d > files > 3

dracut-057-4.mga9.src.rpm

From fe8fa2b0cadbb33e27c8dd8b5851548dcd65835c Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 27 Jun 2022 13:19:41 +0200
Subject: [PATCH 6161/6161] fix(i18n): add required includes for keymaps

Commit https://github.com/dracutdevs/dracut/commit/f3441cc7 removed shell
options but didn't adapt all the code that requires nullglob and globstar.
This caused the initrd to be generated without the required includes for
keymaps.

diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 35bda36f..6fd5fd43 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -63,7 +63,9 @@ install() {
             readarray -t INCLUDES < <("$CMD" '^include ' "$MAP" | while read -r _ a _ || [ -n "$a" ]; do echo "${a//\"/}"; done)
 
             for INCL in "${INCLUDES[@]}"; do
-                for FN in "$dracutsysrootdir""${kbddir}"/keymaps/**/"$INCL"*; do
+                local -a FNS
+                mapfile -t -d '' FNS < <(find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0)
+                for FN in "${FNS[@]}"; do
                     [[ -f $FN ]] || continue
                     [[ -v KEYMAPS["$FN"] ]] || findkeymap "$FN"
                 done
-- 
2.30.6