diff options
author | Graham Christensen <graham@grahamc.com> | 2018-06-05 10:37:38 -0400 |
---|---|---|
committer | Graham Christensen <graham@grahamc.com> | 2018-06-05 13:11:33 -0400 |
commit | ab889c14b5228fbb1d76f61bfa9bb07558ca053c (patch) | |
tree | f4d4552a30f09f3d778415217ab154fe5150fe06 /nixos/modules/system/boot/loader/grub/install-grub.pl | |
parent | 52de38f5f40a97dc46bbb9a442903f26e087bd30 (diff) | |
download | nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar.gz nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar.bz2 nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar.lz nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar.xz nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.tar.zst nixlib-ab889c14b5228fbb1d76f61bfa9bb07558ca053c.zip |
install-grub: only try to loadfont if font is not null
Diffstat (limited to 'nixos/modules/system/boot/loader/grub/install-grub.pl')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/install-grub.pl | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index 1aa14729a75c..872261d0edfa 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -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) { # Keeps the image's extension. |