From 74aad31c33b08f53681af07d79421970a106548f Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Wed, 28 Aug 2013 11:32:14 +0100 Subject: [PATCH] Missing pxelinux.0 on RedHat systems On a RedHat system the syslinux binaries are located in a different directory. Change-Id: I3b7a111e82e8845b6222c57fb2cfb725d9bb1dd7 --- lib/baremetal | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/baremetal b/lib/baremetal index 8f6c3f1660..b591410638 100644 --- a/lib/baremetal +++ b/lib/baremetal @@ -215,7 +215,16 @@ function configure_baremetal_nova_dirs() { # 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