From 709677e574841a9a334815561cf359b8d0c52276 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 18 Apr 2020 17:30:43 +0200 Subject: [PATCH] Verify presence of mcopy for bio key creation --- init.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init.sh b/init.sh index 9214a3a..40f3463 100755 --- a/init.sh +++ b/init.sh @@ -16,15 +16,18 @@ boot_type="efi64" repo_dir="repo" tmp_dir="tmp" current_dir=`pwd` + # In Archlinux, this is default files for syslinux... conf_file="conf/archlinux.conf" key_mountpoint="/mnt/usbstick" device="" + # constant APP_NAME="Debian USB Creator" VERSION="1.99.0" SYSLINUX_EXE=$(which syslinux) PARTED_EXE=$(which parted) +MCOPY=$(which mcopy) SYSLINUX_FILES="menu.c32 vesamenu.c32 libutil.c32 libcom32.c32" SYSLINUX_BIOS_FILES="" SYSLINUX_EFI_FILES="ldlinux.e64" @@ -225,6 +228,12 @@ then exit 1 fi +if [ "$boot_type" == "bios" ] && [ -z "$MCOPY" ] +then + printf "Bios key creation need mcopy from mtools packages\n" + exit 1 +fi + bootfiles_Debian="http://ftp.debian.org/debian/dists/stable/main/installer-${debian_arch}/current/images/hd-media" if [ $archive -eq 1 ] then