From 12379db8c6809777d4ac3ee499ea57e3c10e2275 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Fri, 23 Nov 2012 15:31:06 +0100 Subject: [PATCH] liveboot-testdeploy: don't deploy if mail is missing. DEVINF-253 --- liveboot_testdeploy.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/liveboot_testdeploy.sh b/liveboot_testdeploy.sh index aef16e8..5b7e971 100755 --- a/liveboot_testdeploy.sh +++ b/liveboot_testdeploy.sh @@ -37,6 +37,13 @@ else exit 1 fi +MAIL=$SOURCE_DIR/mail.txt +if [ ! -e $MAIL ] ; then + figlet "Warning:" + echo "$MAIL does not exist, something wrong with the liveboot web UI or was it simply not used at all?" + exit 1 +fi + # # reconfigure PXE to make $TESTSERVER boot this image # @@ -115,12 +122,6 @@ echo # # send announce mail # -MAIL=$SOURCE_DIR/mail.txt -if [ ! -e $MAIL ] ; then - figlet "Warning:" - echo "$MAIL does not exist, something wrong with liveboot-web?" - exit 1 -fi mailtextbody < $MAIL ; echo cat $MAIL | /usr/sbin/sendmail -t echo -- 2.39.5