[ipxe-devel] [PATCH 2/2] [src/util/geniso] check $ISOLINUX_BIN has content

Geert Stappers stappers at stappers.nl
Tue Apr 28 20:18:33 UTC 2020


From: Geert Stappers <stappers at stappers.nl>

src/util/geniso should check whether ${ISOLINUX_BIN} has content
and bail out - else the error message will be somewhat misleading
(cp in line 123 misses an argument)

Reported-By: GrumpyFux
---
 src/util/geniso | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/geniso b/src/util/geniso
index ff090d4a..690a9775 100755
--- a/src/util/geniso
+++ b/src/util/geniso
@@ -119,6 +119,10 @@ case "${LEGACY}" in
 		"${mkisofs[@]}" -b boot.img -output ${OUT} ${dir}
 		;;
 	0)
+		if [ -z "${ISOLINUX_BIN}" ]; then
+			echo "${0}: ISOLINUX_BIN is not defined" >&2
+			exit 1
+		fi
 		# copy isolinux bootloader
 		cp ${ISOLINUX_BIN} ${dir}
 
-- 
2.25.1

_______________________________________________
ipxe-devel mailing list
ipxe-devel at lists.ipxe.org
https://lists.ipxe.org/mailman/listinfo/ipxe-devel



More information about the ipxe-devel mailing list