Fix devstack plugin for centos

The emulator *and* the EFI binary paths are different
when using Centos/Fedora, and Fedora/Centos are distinctly
different with EFI folder paths.

Change-Id: I2c6ba884735f22cc9153de0a24282758ffbdc496
This commit is contained in:
Julia Kreger 2025-02-14 12:48:56 -08:00
parent 690bc31900
commit 0aadeeea7d

View File

@ -105,7 +105,12 @@ if [[ ! "$IRONIC_HW_ARCH" =~ $IRONIC_SUPPORTED_HW_ARCH_TYPES_RE ]]; then
die $LINENO "Unsupported IRONIC_HW_ARCH: $IRONIC_HW_ARCH. Expected either of 'x86_64' or 'aarch64'."
fi
IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}"
if is_ubuntu; then
IRONIC_VM_EMULATOR="/usr/bin/qemu-system-${IRONIC_HW_ARCH}"
else
# Fedora/Centos
IRONIC_VM_EMULATOR="/usr/libexec/qemu-kvm"
fi
GRUB_ARCH=x64
if [[ $IRONIC_HW_ARCH == "aarch64" ]]; then
@ -722,6 +727,20 @@ if [[ "$IRONIC_BOOT_MODE" == "uefi" ]]; then
IRONIC_GRUB2_NETWORK_FILE=/usr/lib/grub/arm64-efi-signed/grubnetaa64.efi.signed
fi
fi
elif is_fedora && grep -qs "CentOS" /etc/redhat-release; then
if [[ $IRONIC_HW_ARCH == "x86_64" ]]; then
if [[ -z $IRONIC_GRUB2_FILE ]]; then
IRONIC_GRUB2_SHIM_FILE=/boot/efi/EFI/centos/shimx64.efi
IRONIC_GRUB2_FILE=/boot/efi/EFI/centos/grubx64.efi
IRONIC_GRUB2_NETWORK_FILE=/boot/efi/EFI/centos/grubx64.efi
fi
elif [[ $IRONIC_HW_ARCH == "aarch64" ]]; then
if [[ -z $IRONIC_GRUB2_FILE ]]; then
IRONIC_GRUB2_SHIM_FILE=/boot/efi/EFI/centos/shimaa64.efi
IRONIC_GRUB2_FILE=/boot/efi/EFI/centos/grubaa64.efi
IRONIC_GRUB2_NETWORK_FILE=/boot/efi/EFI/centos/grubaa64.efi
fi
fi
elif is_fedora; then
if [[ $IRONIC_HW_ARCH == "x86_64" ]]; then
if [[ -z $IRONIC_GRUB2_FILE ]]; then