X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=buildd%2Ffunctions.sh;h=0600dfa06dcec0bd9801c3e81a295cffde7c3ec4;hb=8e7b216f054d8d36ccef614fd83df4f83fcde3bc;hp=9aa4cd68767c13695ea9e5c0b1061f648243fd99;hpb=2848346519849550d686b9dc78f4a0da73f413ac;p=grml-live.git diff --git a/buildd/functions.sh b/buildd/functions.sh index 9aa4cd6..0600dfa 100755 --- a/buildd/functions.sh +++ b/buildd/functions.sh @@ -20,13 +20,14 @@ which mutt >/dev/null 2>&1 || die "mutt binary not found. Exiting." [ -n "$SUITE" ] || die "\$SUITE is not set. Exiting." [ -n "$CLASSES" ] || die "\$CLASSES is not set. Exiting." [ -n "$NAME" ] || die "\$NAME is not set. Exiting." -[ -n "$ISO_NAME" ] || die "\$ISO_NAME is not set. Exiting." +[ -n "$PRODUCT_NAME" ] || die "\$PRODUCT_NAME is not set. Exiting." # some defaults: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 DATE=$(date +'%Y%m%d_%H%M%S') TMP_DIR="$(mktemp -d)" [ -n "$TMP_DIR" ] || die "Could not create \$TMP_DIR. Exiting." +ISO_NAME="${PRODUCT_NAME}.iso" # make sure we have same safe defaults: [ -n "$OUTPUT_DIR" ] || OUTPUT_DIR="${STORAGE}/grml-live_${DATE}.$$" @@ -69,8 +70,8 @@ grml_live_run() { 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=$? + >/var/log/grml-buildd.stdout.log \ + 2>/var/log/grml-buildd.stderr.log ; RC=$? TIME_END=$(date +%s) WALLTIME=$(($TIME_END-$TIME_START)) @@ -84,7 +85,7 @@ grml_live_run() { # create log archive: create_logs() { - ( cd / && tar zcfh $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.log /var/log/grml-buildd.stdout $GRML_LOGFILE >/dev/null ) } # store logs on remote server: @@ -146,7 +147,7 @@ See attached files for further details. EOF" | \ mutt -e "my_hdr From: grml-live autobuild daemon <$FROM>" -s "$SCRIPTNAME [${DATE}] - $RC_INFO" \ - -a /var/log/grml-buildd.stderr $MUTT_ATTACH -- "$RECIPIENT" + -a /var/log/grml-buildd.stderr.log $MUTT_ATTACH -- "$RECIPIENT" } # make sure we store the final iso: