diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 14:01:37 +0000 |
commit | 734d725d62d2cbe4445524448de024e3b9e7f4b3 (patch) | |
tree | 88d8385f24a0efda248b3480fe39037b85e76552 /modules.d/10i18n | |
parent | Releasing progress-linux version 060+5-8~progress7.99u1. (diff) | |
download | dracut-734d725d62d2cbe4445524448de024e3b9e7f4b3.tar.xz dracut-734d725d62d2cbe4445524448de024e3b9e7f4b3.zip |
Merging upstream version 102.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'modules.d/10i18n')
-rwxr-xr-x | modules.d/10i18n/console_init.sh | 2 | ||||
-rwxr-xr-x | modules.d/10i18n/module-setup.sh | 19 |
2 files changed, 17 insertions, 4 deletions
diff --git a/modules.d/10i18n/console_init.sh b/modules.d/10i18n/console_init.sh index 3ca0ac1..7349817 100755 --- a/modules.d/10i18n/console_init.sh +++ b/modules.d/10i18n/console_init.sh @@ -49,7 +49,7 @@ set_font() { setfont "${FONT-${DEFAULT_FONT}}" \ -C "${1}" \ ${FONT_MAP:+-m "${FONT_MAP}"} \ - ${FONT_UNIMAP:+-u "${FONT_UNIMAP}"} + ${FONT_UNIMAP:+-u "${FONT_UNIMAP}"} 2> /dev/null } dev_close() { diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index ac45611..960c41d 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -38,13 +38,13 @@ install() { local CMD local FN - if [[ -f $dracutsysrootdir$1 ]]; then + if [[ -f $1 ]]; then MAPS=("$1") else MAPNAME=${1%.map*} mapfile -t -d '' MAPS < <( - find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f \( -name "${MAPNAME}" -o -name "${MAPNAME}.map*" \) -print0 + find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f,l \( -name "${MAPNAME}" -o -name "${MAPNAME}.map*" \) -print0 ) fi @@ -160,6 +160,7 @@ install() { install_local_i18n() { local map + local maplink # shellcheck disable=SC2086 eval "$(gather_vars ${i18n_vars})" @@ -216,7 +217,19 @@ install() { done for keymap in "${!KEYMAPS[@]}"; do - inst_opt_decompress "${keymap}" + if [[ -L ${keymap} ]]; then + maplink=$(readlink -f "${keymap}") + # skip symlinked directories + [[ -d ${maplink} ]] && continue + + inst_opt_decompress "${maplink}" + # create new symlink to decompressed keymap + maplink=${maplink%.gz} + keymap=${keymap%.gz} + ln -srn "${initdir}${maplink#"$dracutsysrootdir"}" "${initdir}${keymap#"$dracutsysrootdir"}" + else + inst_opt_decompress "${keymap}" + fi done inst_opt_decompress "${kbddir}"/consolefonts/"${DEFAULT_FONT}".* |