Verified Commit 3b42dc75 authored by Joerg Jaspert's avatar Joerg Jaspert 🇩🇪

Dont error out on undefined STAGEFILE

parent 02661e30
......@@ -33,12 +33,12 @@ function onerror() {
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)"
subject="${subject} dinstall error at ${ERRDATE} in ${STAGEFILE:-} - (Be quiet, Brain, or I'll stab you with a Q-tip)"
if [[ -r ${STAGEFILE}.log ]]; then
if [[ -r ${STAGEFILE:-/nonexistant}.log ]]; then
cat "${STAGEFILE}.log"
else
echo "file ${STAGEFILE}.log does not exist, sorry"
echo "file ${STAGEFILE:-}.log does not exist, sorry"
fi | mail -s "${subject}" -a "X-Debian: DAK" -a "From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>" cron@ftp-master.debian.org
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment