From 96f4e40fa5aa15d12f8d4f026bad02481ae52ca9 Mon Sep 17 00:00:00 2001
From: Christopher Spinrath <christopher.spinrath@rwth-aachen.de>
Date: Wed, 2 Sep 2015 00:46:17 +0200
Subject: [PATCH] multiboot: never override the default bootloader

---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 45cd47f..9c3f0b5 100644
--- a/Makefile
+++ b/Makefile
@@ -523,7 +523,8 @@ multiboot :
 		|| (umount -d "$(WORKSPACE)/multiboot.work" && exit 1)
 	#since this is most likely a standalone image make the lipck grubx64 the
 	#default bootloader for 64bit efi systems
-	mv "$(WORKSPACE)/multiboot.work/efi/boot/"{grubx64-unsigned.efi,bootx64.efi} \
+	[ -e "$(WORKSPACE)/multiboot.work/efi/boot/bootx64.efi" ] \
+		|| mv "$(WORKSPACE)/multiboot.work/efi/boot/"{grubx64-unsigned.efi,bootx64.efi} \
 		|| (umount -d "$(WORKSPACE)/multiboot.work" && exit 1)
 	$(MAKE) "IMAGE_PART_FILE=$(WORKSPACE)/multiboot.part" IMAGE_FILE=MultiBoot.img \
 		"IMAGE_DIR=$(WORKSPACE)/multiboot.work" \
-- 
GitLab