From e1de5bd2d711df2c6814a3c3ab8472cdb4de9101 Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Fri, 9 Sep 2022 13:11:14 +0200 Subject: [PATCH] fix(i18n): do not fail if FONT in /etc/vconsole.conf has the file extension If the FONT option defined in /etc/vconsole.conf refers to a file with its extension, not just the file name, dracut should not fail and install it. The systemd-vconsole-setup service ends up calling setfont, which supports both file names and files with extensions. --- modules.d/10i18n/module-setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index 6fd5fd433..ac456112f 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -222,8 +222,12 @@ install() { inst_opt_decompress "${kbddir}"/consolefonts/"${DEFAULT_FONT}".* if [[ ${FONT} ]] && [[ ${FONT} != "${DEFAULT_FONT}" ]]; then - FONT=${FONT%.psf*} - inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".* + if [[ -f "${kbddir}"/consolefonts/"${FONT}" ]]; then + inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}" + else + FONT=${FONT%.psf*} + inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".* + fi fi if [[ ${FONT_MAP} ]]; then