From: Torsten Werner Date: Sat, 1 Jan 2011 16:44:29 +0000 (+0100) Subject: make onerror() in dinstall.functions more robust X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6f206b9db963288b90ff02b78fa2bb5c13ea53f;p=dak make onerror() in dinstall.functions more robust Signed-off-by: Torsten Werner --- diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 0ad674ea..98972e6d 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -22,7 +22,11 @@ function onerror() { 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 -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org + if [ -r "${STAGEFILE}.log" ]; then + cat "${STAGEFILE}.log" + else + echo "file ${STAGEFILE}.log does not exist, sorry" + fi | mail -s "${subject}" -a "X-Debian: DAK" cron@ftp-master.debian.org -- -F "Debian FTP Masters" -f ftpmaster@ftp-master.debian.org } ########################################################################