[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Fix build failure in lh_binary_syslinux that occurs if exithelp.cfg does not exist


 If you do not install a file called exithelp.cfg to SYSLINUX_PATH
then lh_binary_syslinux will cause the build to fail when it attempts
to edit said file using sed as it does not  check to see if the file
actually exists. Below is a patch to correct the issue by properly
checking for the file's existence before attempting the edit.
Hopefully my mail client doesn't screw up the formatting of the patch.

diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux
index 5e5009a..d69b8a0 100755
--- a/helpers/lh_binary_syslinux
+++ b/helpers/lh_binary_syslinux
@@ -294,7 +294,10 @@ Configure_syslinux_templates ()

-       sed -i -e 's/isolinux.cfg/syslinux.cfg/' ${SYSLINUX_PATH}/exithelp.cfg
+       if [ -f "${SYSLINUX_PATH}/exithelp.cfg" ]
+       then
+               sed -i -e 's/isolinux.cfg/syslinux.cfg/'
+       fi

        # Syslinux v3.31 in etch does not support include statements
        if [ "${LH_DISTRIBUTION}" = "etch" ]


Cody A.W. Somerville
Software Systems Release Engineer
Foundations Team
Custom Engineering Solutions Group
Canonical OEM Services
Phone: +1-781-850-2087
Cell: +1-506-471-8402
Email: cody.somerville@canonical.com

Reply to: