Merge pull request #41486 from grahamc/support-null-font
grub: Support when boot.loader.grub.font is null
This commit is contained in:
commit
5467f0ed7a
|
@ -64,9 +64,10 @@ let
|
||||||
)) + ":" + (makeSearchPathOutput "bin" "sbin" [
|
)) + ":" + (makeSearchPathOutput "bin" "sbin" [
|
||||||
pkgs.mdadm pkgs.utillinux
|
pkgs.mdadm pkgs.utillinux
|
||||||
]);
|
]);
|
||||||
font = if lib.last (lib.splitString "." cfg.font) == "pf2"
|
font = if cfg.font == null then ""
|
||||||
|
else (if lib.last (lib.splitString "." cfg.font) == "pf2"
|
||||||
then cfg.font
|
then cfg.font
|
||||||
else "${convertedFont}";
|
else "${convertedFont}");
|
||||||
});
|
});
|
||||||
|
|
||||||
bootDeviceCounters = fold (device: attr: attr // { "${device}" = (attr."${device}" or 0) + 1; }) {}
|
bootDeviceCounters = fold (device: attr: attr // { "${device}" = (attr."${device}" or 0) + 1; }) {}
|
||||||
|
|
|
@ -281,22 +281,24 @@ else {
|
||||||
else
|
else
|
||||||
insmod vbe
|
insmod vbe
|
||||||
fi
|
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) {
|
if ($font) {
|
||||||
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n";
|
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) {
|
if ($splashImage) {
|
||||||
# Keeps the image's extension.
|
# Keeps the image's extension.
|
||||||
|
|
Loading…
Reference in New Issue