]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Report a meaningful error message if isolinux.bin is missing
authorMichael Brown <mcb30@ipxe.org>
Sun, 24 Jan 2021 12:31:48 +0000 (12:31 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sun, 24 Jan 2021 12:31:48 +0000 (12:31 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/util/genfsimg

index 9fc9b6869d46e24f6f50526e015ae396d9b91e1c..345673460bd3eb3f5e37a3fd3570f63fdb1563c1 100755 (executable)
@@ -105,9 +105,11 @@ copy_syslinux_file() {
        ; do
        if [ -e "${SRCDIR}/${FILENAME}" ] ; then
            cp "${SRCDIR}/${FILENAME}" "${DESTDIR}/"
-           break
+           return 0
        fi
     done
+    echo "${0}: could not find ${FILENAME}" >&2
+    return 1
 }
 
 # Parse command-line options
@@ -225,7 +227,7 @@ done
 if [ -n "${ISOIMG}" ] ; then
     ISOARGS="-J -R"
     copy_syslinux_file "isolinux.bin" "${ISODIR}"
-    copy_syslinux_file "ldlinux.c32" "${ISODIR}" || true
+    copy_syslinux_file "ldlinux.c32" "${ISODIR}" 2>/dev/null || true
     ISOARGS="${ISOARGS} -no-emul-boot -eltorito-boot isolinux.bin"
     ISOARGS="${ISOARGS} -boot-load-size 4 -boot-info-table"
     if [ -n "${EFI}" ] ; then