# Cleanup actions
function cleanup() {
- savelog -c ${LOGROTATE} -j "$LOGFILE"
+ rm -f ${LOCK_DAILY}
+ rm -f ${LOCK_ACCEPTED}
}
# Setup the notice file to tell bad mirrors they used the wrong time
# Process the accepted queue
function accepted() {
log "Processing queue/accepted"
- cd "$accepted"
- rm -f REPORT
- dak process-accepted -pa *.changes | tee REPORT | \
- mail -s "Install for $(date +"%D - %R")" ftpmaster@ftp-master.debian.org
+ rm -f "$accepted/REPORT"
+ dak process-accepted -pa -d "$accepted" > "$accepted/REPORT"
+ cat REPORT | mail -s "Install for $(date +"%D - %R")" ftpmaster@ftp-master.debian.org
chgrp debadmin REPORT
chmod 664 REPORT
}
dak generate-releases
}
-function cleanup() {
+function dakcleanup() {
log "Cleanup old packages/files"
dak clean-suites
dak clean-queues
# it has to cd first!
cd ${configdir}
- if [ "${ERR}" = "false"]; then
+ if [ "${ERR}" = "false" ]; then
set +e
fi
${FUNC} ${ARGS}
# We need logs.
LOGFILE="$logdir/dinstall.log"
-exec > "$LOGFILE" 2>&1
+exec >> "$LOGFILE" 2>&1
# usually we are not using debug logs. Set to 1 if you want them.
DEBUG=0
FUNC="updates"
TIME="External Updates"
ARGS=""
- ERR=""
+ ERR="false"
)
stage $GO
)
stage $GO
-rm -f $LOCKAC
+rm -f "$LOCK_ACCEPTED"
GO=(
FUNC="msfl"
stage $GO
GO=(
- FUNC="cleanup"
+ FUNC="dakcleanup"
TIME="cleanup"
ARGS=""
ERR=""
cat "$LOGFILE" | mail -s "Log for dinstall run of ${NOW}" cron@ftp-master.debian.org
+savelog -c ${LOGROTATE} -j "$LOGFILE"
+
# Now, at the very (successful) end of dinstall, make sure we remove
# our stage files, so the next dinstall run will do it all again.
rm -f "${stagedir}/*"