From 5b76a63f57ecfa4a56f9fa427326356ecbd2c9dd Mon Sep 17 00:00:00 2001 From: Yorick Date: Mon, 10 Oct 2016 21:57:05 +0200 Subject: [PATCH] Add syslinux executable test --- init.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/init.sh b/init.sh index 94b14b8..94b3b4a 100755 --- a/init.sh +++ b/init.sh @@ -9,6 +9,7 @@ OPTIND=1 DEBIAN_VERSION="8.6.0" DEBIAN_ARCH="amd64" BOOT_TYPE="efi64" +SYSLINUX_EXE=`witch syslinux` SYSLINUX_FILES="menu.c32 vesamenu.c32 libutil.c32 libcom32.c32" SYSLINUX_BIOS_FILES="" SYSLINUX_EFI_FILES="ldlinux.e64" @@ -52,6 +53,13 @@ create_dir(){ if [ ! -d $1 ]; then mkdir -p $1; fi } +#Stop script if syslinux is not installed +if [ ! -f $SYSLINUX_EXE] +then + echo "Syslinux not found, script can't continue…" + exit 1 +fi + # Arguments ... while getopts "ha:bd:" opt; do case "$opt" in