From a75544e0c3eb41dd218d77054095b8c67b9d6e3a Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 23 Aug 2017 19:20:35 -0400 Subject: [PATCH] Only set a default GRUB_PRELOAD_MODULES if not already defined; otherwise used the existing values. --- live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary index 9594c0d3..600213eb 100755 --- a/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks/033-disk-image-uefi.binary @@ -82,8 +82,9 @@ install_grub() { cat << EOF >> mountpoint/etc/default/grub.d/50-cloudimg-settings.cfg ${CLOUD_IMG_STR} # For Cloud Image compatability -GRUB_PRELOAD_MODULES="${grub_modules}" +GRUB_PRELOAD_MODULES="${GRUB_PRELOAD_MODULES:-$grub_modules}" EOF + chroot mountpoint grub-install "${loop_device}" \ --boot-directory=/boot \ --efi-directory=/boot/efi \