Merge "Overwrite EFI grub.cfg when it exists"
This commit is contained in:
@@ -207,16 +207,16 @@ fi
|
|||||||
# linuxefi/initrdefi for the image to boot under efi
|
# linuxefi/initrdefi for the image to boot under efi
|
||||||
if [[ ${DIB_BLOCK_DEVICE} == "efi" ]]; then
|
if [[ ${DIB_BLOCK_DEVICE} == "efi" ]]; then
|
||||||
sed -i 's%\(linux\|initrd\)16 /boot%\1efi /boot%g' $GRUB_CFG
|
sed -i 's%\(linux\|initrd\)16 /boot%\1efi /boot%g' $GRUB_CFG
|
||||||
|
fi
|
||||||
|
|
||||||
# Finally copy the grub.cfg and grubenv to the EFI specific dir
|
# Finally copy the grub.cfg and grubenv to the EFI specific dir
|
||||||
# to support functionality like secure boot. We make a copy because
|
# to support functionality like secure boot. We make a copy because
|
||||||
# /boot and /boot/efi may be different partitions and uefi looks
|
# /boot and /boot/efi may be different partitions and uefi looks
|
||||||
# for a specific partition UUID preventing symlinks from working.
|
# for a specific partition UUID preventing symlinks from working.
|
||||||
if [ -d /boot/efi/$EFI_BOOT_DIR ] ; then
|
if [ -n "${EFI_BOOT_DIR:-}" ] && [ -d /boot/efi/$EFI_BOOT_DIR ] ; then
|
||||||
cp $GRUB_CFG /boot/efi/$EFI_BOOT_DIR/grub.cfg
|
cp $GRUB_CFG /boot/efi/$EFI_BOOT_DIR/grub.cfg
|
||||||
if [ -a $GRUBENV ]; then
|
if [ -a $GRUBENV ]; then
|
||||||
cp $GRUBENV /boot/efi/$EFI_BOOT_DIR/grubenv
|
cp $GRUBENV /boot/efi/$EFI_BOOT_DIR/grubenv
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1,2 +1,3 @@
|
|||||||
export DISTRO_NAME=fedora
|
export DISTRO_NAME=fedora
|
||||||
export DIB_RELEASE=${DIB_RELEASE:-34}
|
export DIB_RELEASE=${DIB_RELEASE:-34}
|
||||||
|
export EFI_BOOT_DIR="EFI/fedora"
|
||||||
|
Reference in New Issue
Block a user