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 <congdanhqx@gmail.com>
master
Đoàn Trần Công Danh 2021-04-12 22:23:02 +07:00 committed by Harald Hoyer
parent 96c313333d
commit 651fe01e79
1 changed files with 2 additions and 0 deletions

View File

@ -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 ' \