From e6f206b9db963288b90ff02b78fa2bb5c13ea53f Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sat, 1 Jan 2011 17:44:29 +0100 Subject: [PATCH] make onerror() in dinstall.functions more robust Signed-off-by: Torsten Werner --- config/debian/dinstall.functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 } ######################################################################## -- 2.39.5