]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
liveboot-testdeploy: don't deploy if mail is missing. DEVINF-253
authorHolger Levsen <holger@layer-acht.org>
Fri, 23 Nov 2012 14:31:06 +0000 (15:31 +0100)
committerHolger Levsen <holger@layer-acht.org>
Fri, 23 Nov 2012 14:31:06 +0000 (15:31 +0100)
liveboot_testdeploy.sh

index aef16e8b178cf3ddad75348c7fcd978bab729110..5b7e97151086d5627a8c35661da3245f935fc3d3 100755 (executable)
@@ -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