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

This commit is contained in:
Graham Christensen
2018-06-05 13:11:33 -04:00
parent 52de38f5f4
commit ab889c14b5
@@ -281,6 +281,11 @@ else {
else else
insmod vbe insmod vbe
fi fi
";
if ($font) {
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n";
$conf .= "
insmod font insmod font
if loadfont " . $grubBoot->path . "/converted-font.pf2; then if loadfont " . $grubBoot->path . "/converted-font.pf2; then
insmod gfxterm insmod gfxterm
@@ -294,9 +299,6 @@ else {
terminal_output gfxterm terminal_output gfxterm
fi fi
"; ";
if ($font) {
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n";
} }
if ($splashImage) { if ($splashImage) {
# Keeps the image's extension. # Keeps the image's extension.