Skip to content

Commit a01f3d0

Browse files
committed
Make sure /boot/grub/grubenv exists prior to calling grub-editenv
1 parent ccf40ee commit a01f3d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/GenGrubConf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class GrubConf:
3232
cmd_env["GRUB_CMDLINE_LINUX"] = "vt.default_utf8=1 brd.rd_nr=0 hid_apple.iso_layout=0 hid_apple.fnmode=2 video=LVDS-1:e video=HDMI-1:e video=VGA=1:e rootwait net.ifnames=0"
3333
subprocess.Popen(["grub-mkconfig", "-o", self.grubconf], env=cmd_env).wait()
3434

35-
if not is_uefi():
35+
if not is_uefi() and os.path.exists("/System/Kernel/Boot/grub/grubenv"):
3636
subprocess.Popen(["grub-editenv", "-", "set", "feature_default_font_path=n"]).wait()
3737

3838
self.data = open(self.grubconf).read()

0 commit comments

Comments
 (0)