X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=buildd%2Ffunctions.sh;h=967c8f1170e5153557119a9235a59e87bca57441;hp=86063b4473718b3ad88859d504a73a753b7a9024;hb=06671c3424c60d65e9006d80cdf67d519b75d5ba;hpb=db089ea5e632e3b76e70fdee6eb3a7548411ca84 diff --git a/buildd/functions.sh b/buildd/functions.sh index 86063b4..967c8f1 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. -# Latest change: Fri Oct 26 01:29:50 CEST 2007 [mika] +# Latest change: Die Okt 30 09:47:34 CET 2007 [mika] ################################################################################ die() { @@ -37,12 +37,15 @@ MUTT_HEADERS=$(mktemp) [ -n "$ISO_DIR" ] || ISO_DIR=$STORAGE/grml-isos [ -n "$RECIPIENT" ] || RECIPIENT=root@localhost [ -n "$ATTACHMENT" ] || ATTACHMENT=$TMP_DIR/grml-live-logs_$DATE.tar.gz -[ -n "$FAI_LOGFILES" ] || FAI_LOGFILES=/var/log/fai/dirinstall/grml -[ -n "$GRML_LOGFILES" ] || GRML_LOGFILES=/var/log/grml-live/ [ -n "$FROM" ] || FROM=root@localhost -[ -d "$FAI_LOGFILES" ] || mkdir -p $FAI_LOGFILES -[ -d "$GRML_LOGFILES" ] || mkdir -p $GRML_LOGFILES +if [ -n "$LOGFILE" ] ; then + GRML_LOGFILE="$LOGFILE" +else + [ -n "$GRML_LOGFILE" ] || GRML_LOGFILE=/var/log/grml-live.log +fi + +[ -n "$FAI_LOGFILES" ] || FAI_LOGFILES=/var/log/fai/dirinstall/grml echo "my_hdr From: grml-live autobuild daemon <$FROM>" > $MUTT_HEADERS @@ -57,8 +60,8 @@ grml_live_run() { grml-live -F $GRML_LIVE_ARCH -s $SUITE -c $CLASSES -o $OUTPUT_DIR \ -g $NAME -v $DATE -r grml-live-autobuild -i $ISO_NAME \ - 1>$GRML_LOGFILES/grml-buildd.stdout \ - 2>$GRML_LOGFILES/grml-buildd.stderr ; RC=$? + 1>/var/log/grml-buildd.stdout \ + 2>/var/log/grml-buildd.stderr ; RC=$? if [ "$RC" = "0" ] ; then RC_INFO=success @@ -69,7 +72,7 @@ grml_live_run() { # create log archive: create_logs() { - ( cd / && tar zcf $ATTACHMENT var/log/fai/dirinstall/grml 1>/dev/null ) + ( cd / && tar zcf $ATTACHMENT var/log/fai/dirinstall/grml $GRML_LOGFILE 1>/dev/null ) } # store information of ISO size: @@ -89,13 +92,23 @@ $ISO_DETAILS Return code of grml-live run was: $RC +$(grep 'Executed command line:' $GRML_LOGFILE || echo "* executed command line not available") + The following errors have been noticed (several might be warnings only): -$(grep error $FAI_LOGFILES/* | grep -ve liberror -ve libgpg-error || echo "* nothing") +$(grep -i error $FAI_LOGFILES/* /var/log/grml-buildd.std* | grep -ve liberror -ve libgpg-error || echo "* nothing") The following warnings have been noticed: -$(grep warn $FAI_LOGFILES/* || echo "* nothing") +$(grep -i warn $FAI_LOGFILES/* /var/log/grml-buildd.std* || echo "* nothing") + +There following dependency problems have been noticed: + +$(grep -i "Not Installed" $FAI_LOGFILES/software.log || echo "* nothing") + +The following packages could not be installed: + +$(grep -i "Couldn't find.*package" $FAI_LOGFILES/software.log | sed 's/\(.*\)"\(.*\)"\(.*\)/\2/' | sort -u || echo "* nothing") Find details in the attached logs." | \ mutt -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \