[dak/master] 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 <joerg@debian.org>
---
config/debian/cron.dinstall | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/config/debian/cron.dinstall b/config/debian/cron.dinstall
index 82f7cbe..09415be 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
}
########################################################################
--
1.5.6.5
Reply to: