Skip to content

Commit

Permalink
install-grub: only try to loadfont if font is not null
Browse files Browse the repository at this point in the history
(cherry picked from commit ab889c1)
  • Loading branch information
grahamc committed Jun 5, 2018
1 parent 4da554d commit 49a6964
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions nixos/modules/system/boot/loader/grub/install-grub.pl
Expand Up @@ -281,22 +281,24 @@ sub GrubFs {
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
Expand Down

0 comments on commit 49a6964

Please sign in to comment.