X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=buildd%2Ffunctions.sh;h=9aa4cd68767c13695ea9e5c0b1061f648243fd99;hb=3cb3de36e77c4444f3974b38e1e35e4e640ef740;hp=631d3e2f6a487b287b6ee1dc157380f1e7ff082f;hpb=79e4473d95f50bd83cd45cf592afc692a2011b87;p=grml-live.git diff --git a/buildd/functions.sh b/buildd/functions.sh index 631d3e2..9aa4cd6 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Filename: /usr/share/grml-live/buildd/functions.sh # Purpose: main function file for grml-live buildd # Authors: grml-team (grml.org), (c) Michael Prokop @@ -66,10 +66,13 @@ grml_live_run() { grml_name="$NAME-daily-$CODENAME" shortdate="$(date +%y%m%d)" + TIME_START=$(date +%s) grml-live -F $* -a $ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ -g "$grml_name" -v "$shortdate" -r grml-live-autobuild -i $ISO_NAME \ >/var/log/grml-buildd.stdout \ 2>/var/log/grml-buildd.stderr ; RC=$? + TIME_END=$(date +%s) + WALLTIME=$(($TIME_END-$TIME_START)) if [ "$RC" = "0" ] ; then RC_INFO=success @@ -81,7 +84,7 @@ grml_live_run() { # create log archive: create_logs() { - ( cd / && tar zcf $ATTACHMENT $FAI_LOGFILES /var/log/grml-buildd.stderr /var/log/grml-buildd.stdout $GRML_LOGFILE >/dev/null ) + ( cd / && tar zcfh $ATTACHMENT $FAI_LOGFILES /var/log/grml-buildd.stderr /var/log/grml-buildd.stdout $GRML_LOGFILE >/dev/null ) } # store logs on remote server: @@ -108,11 +111,12 @@ send_mail() { # attach logs only if we have some: [ -r "$ATTACHMENT" ] && MUTT_ATTACH="-a $ATTACHMENT" || MUTT_ATTACH='' - echo -en "Automatically generated mail by $SCRIPTNAME + echo "Automatically generated mail by $SCRIPTNAME $ISO_DETAILS -Return code of grml-live run was: $RC +Return code of grml-live was: $RC +Time: $WALLTIME $(grep -A2 'Executed grml-live' $GRML_LOGFILE || echo "* executed grml-live command line not available") @@ -120,7 +124,11 @@ $(grep -A2 'Executed FAI' $GRML_LOGFILE || echo "* executed FAI command line not The following errors have been noticed (several might be warnings only): -$(grep -i error $FAI_LOGFILES/* /var/log/grml-buildd.std* | grep -ve liberror -ve libgpg-error || echo "* nothing") +$(grep -i error $FAI_LOGFILES/*.log /var/log/grml-buildd.std* | grep -ve liberror -ve libgpg-error -ve libcomerr -ve 'no errors found' || echo "* nothing") + +The following errors have been noticed in FAI scripts: + +$(grep -B2 "FAILED with exit code" $FAI_LOGFILES/* | echo "* nothing") The following warnings have been noticed: