X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall;h=9ee1781cc83f9ad994a860c4db45a7843066b0b7;hb=411333f097fae83f84e8f08f8daf4ed1fa56cf4d;hp=cb6e03a6ca5f14393bb951ecbd42c8c349c19d46;hpb=5141ab3bc7f3e8220d9d9c435bb573a90a211813;p=dak.git diff --git a/config/debian/dinstall b/config/debian/dinstall index cb6e03a6..9ee1781c 100755 --- a/config/debian/dinstall +++ b/config/debian/dinstall @@ -167,9 +167,8 @@ function i18n1() { # Process the accepted queue function accepted() { log "Processing queue/accepted" - cd "$accepted" - rm -f REPORT - dak process-accepted -pa -d "$accepted" > REPORT + 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 @@ -314,7 +313,7 @@ function i18n2() { ln -sfT ${scriptdir}/i18n/${STAMP} i18n cd ${scriptdir} - find ./i18n -mtime +2 -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf + find ./i18n -mindepth 1 -maxdepth 1 -mtime +2 -not -name "${STAMP}" -type d -print0 | xargs --no-run-if-empty -0 rm -rf } function stats() { @@ -385,6 +384,11 @@ function stage() { # it has to cd first! cd ${configdir} + if [ -f "${LOCK_STOP}" ]; then + log "${LOCK_STOP} exists, exiting immediately" + exit 42 + fi + if [ "${ERR}" = "false" ]; then set +e fi @@ -398,6 +402,11 @@ function stage() { touch "${stagedir}/${FUNC}" + if [ -f "${LOCK_STOP}" ]; then + log "${LOCK_STOP} exists, exiting immediately" + exit 42 + fi + if [ -n "${TIME}" ]; then ts "${TIME}" fi @@ -446,6 +455,10 @@ LOCK_ACCEPTED="$lockdir/unchecked.lock" # from our point of view LOCK_BRITNEY="$lockdir/britney.lock" +# If this file exists we exit immediately after the currently running +# function is done +LOCK_STOP="$lockdir/archive.stop" + lockfile -l 3600 "${LOCK_DAILY}" trap cleanup EXIT ERR TERM HUP INT QUIT @@ -702,7 +715,7 @@ GO=( ) stage $GO -rm -f ${BRITNEYLOCK} +rm -f ${LOCK_BRITNEY} GO=( FUNC="aptftpcleanup"