From: Đoàn Trần Công Danh Date: Mon, 12 Apr 2021 15:23:02 +0000 (+0700) Subject: fix(i18n): skip if data is missing X-Git-Tag: 054~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=651fe01e7937d86bbd471d9621581bed44f23dfa;p=thirdparty%2Fdracut.git fix(i18n): skip if data is missing On system that doesn't have either consolefonts, consoletrans, keymaps, or unimaps, "kbddir" is empty, thus the followed installation will broken with errors like: cp: cannot stat '/consolefonts/*': No such file or directory Let's report the checks as failure if "kbddir" is empty. Signed-off-by: Đoàn Trần Công Danh --- diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index c0768b506..f25026fb8 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -265,6 +265,8 @@ install() { kbddir='' done + [[ "$kbddir" ]] || return 1 + [[ -f $dracutsysrootdir$I18N_CONF && -f $dracutsysrootdir$VCONFIG_CONF ]] \ || [[ ! ${hostonly} || ${i18n_vars} ]] || { derror 'i18n_vars not set! Please set up i18n_vars in ' \