From 9e81b3f6087c5dedbf7659cde7bef92ef3b1426d Mon Sep 17 00:00:00 2001
From: Holger Paradies <retabell@gmx.de>
Date: Sat, 4 Nov 2023 14:48:11 +0100
Subject: Fix for package install

---
 backend/modules/install_configure | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/backend/modules/install_configure b/backend/modules/install_configure
index f24be35..b80589d 100644
--- a/backend/modules/install_configure
+++ b/backend/modules/install_configure
@@ -90,10 +90,15 @@ EOF
 	esac
 	
 	# if build with debpool install selected packages
+	# make a distinction between uefi and legacy packages
+	# TODO implement ia32
 	if [ -d /run/live/medium/debian ]; then
-	cp -f /run/live/medium/debian/pool/main/g/grub2/*.deb "$TARGET/tmp/"
-#	cp -f /run/live/medium/debian/pool/main/m/mokutil/*.deb "$TARGET/tmp/"
-#	cp -f /run/live/medium/debian/pool/main/r/refind/*.deb "$TARGET/tmp/"
+		if [ -d /sys/firmware/efi/efivars ]; then
+		cp -f /run/live/medium/debian/pool/main/g/grub2/*.deb "$TARGET/tmp/"
+		#cp -f /run/live/medium/debian/pool/main/m/mokutil/*.deb "$TARGET/tmp/"
+		#cp -f /run/live/medium/debian/pool/main/r/refind/*.deb "$TARGET/tmp/"
+		fi
+	#cp -f /run/live/medium/debian/pool/main/o/openssh/*.deb "$TARGET/tmp/"
 	ls "$TARGET/tmp/" >/tmp/target.log
 	fi
 	
-- 
cgit v1.0