Missing pxelinux.0 on RedHat systems
On a RedHat system the syslinux binaries are located in a different
directory.
Change-Id: I3b7a111e82e8845b6222c57fb2cfb725d9bb1dd7
diff --git a/lib/baremetal b/lib/baremetal
index 8f6c3f1..b591410 100644
--- a/lib/baremetal
+++ b/lib/baremetal
@@ -215,7 +215,16 @@
# ensure /tftpboot is prepared
sudo mkdir -p /tftpboot
sudo mkdir -p /tftpboot/pxelinux.cfg
- sudo cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
+
+ PXEBIN=/usr/share/syslinux/pxelinux.0
+ if [ ! -f $PXEBIN ]; then
+ PXEBIN=/usr/lib/syslinux/pxelinux.0
+ if [ ! -f $PXEBIN ]; then
+ die $LINENO "pxelinux.0 (from SYSLINUX) not found."
+ fi
+ fi
+
+ sudo cp $PXEBIN /tftpboot/
sudo chown -R $STACK_USER:$LIBVIRT_GROUP /tftpboot
# ensure $NOVA_STATE_PATH/baremetal is prepared