]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(i18n): add required includes for keymaps
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 27 Jun 2022 11:19:41 +0000 (13:19 +0200)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Fri, 8 Jul 2022 04:48:55 +0000 (04:48 +0000)
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.

modules.d/10i18n/module-setup.sh

index 35bda36fbfd5a685fb43aa59829b83b9b8c21a9f..6fd5fd433eaa95cc08fc97e78716633bb335cc14 100755 (executable)
@@ -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