X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fcommon;h=d878d5f51bc1617dd5a0f345a10a6d013c39c5b3;hb=891e1ef72e79a6b566a9230b3d471ccab7e9348f;hp=5a7ec0bf8cabe6815d3feafaacac328dde244e8a;hpb=9639afdb34ea7c5fdaf62e05a78ca0aab288f6de;p=dak.git diff --git a/config/debian/common b/config/debian/common index 5a7ec0bf..d878d5f5 100644 --- a/config/debian/common +++ b/config/debian/common @@ -3,17 +3,17 @@ # # Set $PROGRAM to a string to have it added to the output. function log () { - local prefix=${PROGRAM:-} - echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${prefix}[$$]: $@" + local prefix=${PROGRAM:-} + echo "$(date +"%b %d %H:%M:%S") $(hostname -s) ${prefix}[$$]: $@" } # log the message using log() but then also send a mail # to the address configured in MAILTO (if non-empty) function log_error () { - log "$@" - if [ -z "${MAILTO}" ]; then - echo "$@" | mail -a "X-Debian: DAK" -e -s "[$PROGRAM@$(hostname -s)] ERROR [$$]" -a "From: Debian FTP Masters " ${MAILTO} - fi + log "$@" + if [ -z "${MAILTO}" ]; then + echo "$@" | mail -a "X-Debian: DAK" -e -s "[$PROGRAM@$(hostname -s)] ERROR [$$]" -a "From: Debian FTP Masters " ${MAILTO} + fi } # debug log, only output when DEBUG=1 @@ -164,8 +164,10 @@ function do_new () { log "Doing NEW processing" (dak process-policy new; dak process-policy byhand) | mail -a "X-Debian: DAK" -e -s "NEW and BYHAND processing" -a "From: Debian FTP Masters " ftpmaster@ftp-master.debian.org + log "Processing Backports NEW" dak process-policy backports-new | mail -a "X-Debian: DAK" -e -s "NEW processing for backports-new" -a "From: Debian FTP Masters " backports-team@debian.org + log "Cleanup NEW/Backports NEW" dak clean-suites -a new,backports-new }