X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=config%2Fdebian%2Fdinstall;h=4544d0a0daeb256e3ba38a5f2867560cf9c731d3;hb=9b518daca5ef156c01c203843f3a4fbd2a630434;hp=c1b74891b0c3f66b76b43afeea22941c9c5e482d;hpb=cd790030954ecebf32306a1f67c32c4ac5309698;p=dak.git diff --git a/config/debian/dinstall b/config/debian/dinstall index c1b74891..4544d0a0 100755 --- a/config/debian/dinstall +++ b/config/debian/dinstall @@ -64,6 +64,7 @@ function ts() { # Cleanup actions function cleanup() { rm -f ${LOCK_DAILY} + rm -f ${LOCK_ACCEPTED} } # Setup the notice file to tell bad mirrors they used the wrong time @@ -166,9 +167,8 @@ function i18n1() { # Process the accepted queue function accepted() { log "Processing queue/accepted" - cd "$accepted" - rm -f REPORT - dak process-accepted -pa *.changes > 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 @@ -384,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 @@ -397,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 @@ -445,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 @@ -524,7 +538,7 @@ GO=( ) stage $GO -rm -f $LOCKAC +rm -f "$LOCK_ACCEPTED" GO=( FUNC="msfl"