install-grub: only try to loadfont if font is not null

(cherry picked from commit ab889c14b5228fbb1d76f61bfa9bb07558ca053c)
release-18.03-flake
Graham Christensen 2018-06-05 10:37:38 -04:00
parent 4da554df0f
commit 49a6964a42
No known key found for this signature in database
GPG Key ID: ACA1C1D120C83D5C
1 changed files with 14 additions and 12 deletions

View File

@ -281,22 +281,24 @@ else {
else
insmod vbe
fi
insmod font
if loadfont " . $grubBoot->path . "/converted-font.pf2; then
insmod gfxterm
if [ \"\${grub_platform}\" = \"efi\" ]; then
set gfxmode=$gfxmodeEfi
set gfxpayload=keep
else
set gfxmode=$gfxmodeBios
set gfxpayload=text
fi
terminal_output gfxterm
fi
";
if ($font) {
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n";
$conf .= "
insmod font
if loadfont " . $grubBoot->path . "/converted-font.pf2; then
insmod gfxterm
if [ \"\${grub_platform}\" = \"efi\" ]; then
set gfxmode=$gfxmodeEfi
set gfxpayload=keep
else
set gfxmode=$gfxmodeBios
set gfxpayload=text
fi
terminal_output gfxterm
fi
";
}
if ($splashImage) {
# FIXME: GRUB 1.97 doesn't resize the background image if it