Fix Ironic for Syslinux >= 5.00
Syslinux >= 5.00 pxelinux.0 binary is not "stand-alone"
anymore, it depends on some c32 modules to work correctly.
See: http://www.syslinux.org/wiki/index.php/Library_modules
Closes-Bug: #1419867
Change-Id: Ia62e980052ece3d5e2abf090b5609dea31f0d6b8
diff --git a/lib/ironic b/lib/ironic
index 7ffa6a5..b39d2cc 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -238,7 +238,15 @@
die $LINENO "PXE boot file $IRONIC_PXE_BOOT_IMAGE not found."
fi
- cp $IRONIC_PXE_BOOT_IMAGE $IRONIC_TFTPBOOT_DIR
+ # Copy PXE binary
+ if [[ "$IRONIC_IPXE_ENABLED" == "True" ]] ; then
+ cp $IRONIC_PXE_BOOT_IMAGE $IRONIC_TFTPBOOT_DIR
+ else
+ # Syslinux >= 5.00 pxelinux.0 binary is not "stand-alone" anymore,
+ # it depends on some c32 modules to work correctly.
+ # More info: http://www.syslinux.org/wiki/index.php/Library_modules
+ cp -aR $(dirname $IRONIC_PXE_BOOT_IMAGE)/*.{c32,0} $IRONIC_TFTPBOOT_DIR
+ fi
}
# configure_ironic() - Set config files, create data dirs, etc