diff --git a/features.in/syslinux/scripts.d/20-propagator-ramdisk-syslinux b/features.in/syslinux/scripts.d/20-propagator-ramdisk-syslinux index d8f16749..81a8e767 100755 --- a/features.in/syslinux/scripts.d/20-propagator-ramdisk-syslinux +++ b/features.in/syslinux/scripts.d/20-propagator-ramdisk-syslinux @@ -3,9 +3,13 @@ # when the image sizes are finally known # NB: install2_size, live_size, rescue_size get defined here -cd "$WORKDIR" +# validate just in case (see also stage1 Makefile) +if [ -z "$(find $WORKDIR/syslinux/*.cfg)" ]; then + echo "Warning: syslinux/*.cfg not found" + exit 0 +fi -[ -d "syslinux" ] || exit 0 +cd "$WORKDIR" # apply size census while looking for potential squashfs images find -maxdepth 1 -type f -size +1M \ diff --git a/features.in/syslinux/scripts.d/20-propagator-rescue-hash-syslinux b/features.in/syslinux/scripts.d/20-propagator-rescue-hash-syslinux index 98d0cedb..74ee3751 100755 --- a/features.in/syslinux/scripts.d/20-propagator-rescue-hash-syslinux +++ b/features.in/syslinux/scripts.d/20-propagator-rescue-hash-syslinux @@ -3,9 +3,13 @@ # to add rescue image hash, if any # (for propagator in forensic mode) -cd "$WORKDIR" +# validate just in case (see also stage1 Makefile) +if [ -z "$(find $WORKDIR/syslinux/*.cfg)" ]; then + echo "Warning: syslinux/*.cfg not found" + exit 0 +fi -[ -d "syslinux" ] || exit 0 +cd "$WORKDIR" grep -qs "@rescue_hash@" syslinux/*.cfg || exit 0 diff --git a/features.in/syslinux/stage1/scripts.d/02-gfxboot b/features.in/syslinux/stage1/scripts.d/02-gfxboot index 9deb6cdd..f4bde1dd 100755 --- a/features.in/syslinux/stage1/scripts.d/02-gfxboot +++ b/features.in/syslinux/stage1/scripts.d/02-gfxboot @@ -1,6 +1,10 @@ #!/bin/sh -[ -d "$WORKDIR/syslinux" ] || exit 0 +# validate just in case (see also stage1 Makefile) +if [ ! -f "$WORKDIR/syslinux/$GLOBAL_BOOTLOADER.cfg" ]; then + echo "Warning: syslinux/*.cfg not found" + exit 0 +fi gfxboot_datadir=/usr/share/gfxboot