Fix iso-image-create to work on RedHat distros

- RedHat distros keep isolinux.bin at /usr/share/syslinux
- Do not use /usr/lib/syslinux blindly
Closes-Bug: #1472379

Change-Id: I2d58913090f2d35cc6446cf769b1f6618f29f849
This commit is contained in:
Arun S A G 2015-07-07 12:49:48 -07:00
parent a0f7485460
commit 50c23c4cda

View File

@ -97,7 +97,19 @@ mkdir -p "$TMP_IMAGE_DIR"
# Copy isolinux bin to the isolinux directory
mkdir -p "$TMP_IMAGE_DIR/isolinux"
v_print "Copying isolinux.bin"
cp /usr/lib/syslinux/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
if [ -f /usr/share/syslinux/isolinux.bin ]
then
cp /usr/share/syslinux/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
elif [ -f /usr/lib/syslinux/isolinux.bin ]
then
cp /usr/lib/syslinux/isolinux.bin "$TMP_IMAGE_DIR/isolinux"
else
err_print "Could not find isolinux.bin. Install syslinux?"
cleanup
exit 1
fi
# Copy initrd, kernel
v_print "Copying kernel to $TMP_IMAGE_DIR/vmlinuz"