From d3e7dbdd0037ccbcb4789365cbca67de06bce5fa Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Sun, 21 Jun 2009 11:54:13 +0200 Subject: [PATCH] dinstall mention in subject of error mails if dinstall was broken due to this, or if the error was ignored. Signed-off-by: Joerg Jaspert --- config/debian/cron.dinstall | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall index 82f7cbeb..09415bea 100755 --- a/config/debian/cron.dinstall +++ b/config/debian/cron.dinstall @@ -58,7 +58,17 @@ function cleanup() { # If we error out this one is called, *FOLLOWED* by cleanup above function onerror() { ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S") - cat "${STAGEFILE}.log" | mail -s "ATTENTION ATTENTION! dinstall error at ${ERRDATE} in ${STAGEFILE} - (Be quiet, Brain, or I'll stab you with a Q-tip)" cron@ftp-master.debian.org + error=${ERR:-"false"} + + subject="ATTENTION ATTENTION!" + if [ "${error}" = "false" ]; then + subject="${subject} (continued)" + else + subject="${subject} (interrupted)" + fi + subject="${subject} dinstall error at ${ERRDATE} in ${STAGEFILE} - (Be quiet, Brain, or I'll stab you with a Q-tip)" + + cat "${STAGEFILE}.log" | mail -s "${subject}" -a "X-Debian: DAK" cron@ftp-master.debian.org } ######################################################################## -- 2.39.5