From 5f8999e3ea9b122892d62ac9e88b155d8fe64821 Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 2 Dec 2009 02:35:26 -0300 Subject: Abort mkarchiso if isolinux.cfg is not found. Signed-off-by: Gerardo Exequiel Pozzi --- archiso/mkarchiso | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/archiso/mkarchiso b/archiso/mkarchiso index ea3089a..db04561 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -218,14 +218,17 @@ _imgcommon () { echo "Removing existing bootable image..." rm -rf "${imgname}" else - echo "error: Image '${imgname}' already exists, aborting." + echo "Error: Image '${imgname}' already exists, aborting." exit 1 fi fi cp "${work_dir}/isomounts" "${work_dir}/iso/" - [ -f ${work_dir}/iso/boot/isolinux/isolinux.cfg ] && sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|" -i ${work_dir}/iso/boot/isolinux/isolinux.cfg + if ! sed "s|archisolabel=[^ ]*|archisolabel=${LABEL}|" -i ${work_dir}/iso/boot/isolinux/isolinux.cfg; then + echo "Error: ${work_dir}/iso/boot/isolinux/isolinux.cfg, doesn't exist, aborting." + exit 1 + fi } command_iso () { -- cgit v1.2.3-70-g09d2