From: Antonio Alvarez Feijoo Date: Fri, 9 Sep 2022 11:11:14 +0000 (+0200) Subject: fix(i18n): do not fail if FONT in /etc/vconsole.conf has the file extension X-Git-Tag: 058~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1de5bd2d711df2c6814a3c3ab8472cdb4de9101;p=thirdparty%2Fdracut.git 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. --- 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