]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall
dinstall
[dak.git] / config / debian / dinstall
index b6ed073a3c2c82f90046febc38d15b6cc921fcbc..9ee1781cc83f9ad994a860c4db45a7843066b0b7 100755 (executable)
@@ -313,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() {
@@ -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
 
@@ -701,7 +715,7 @@ GO=(
 )
 stage $GO
 
-rm -f ${BRITNEYLOCK}
+rm -f ${LOCK_BRITNEY}
 
 GO=(
     FUNC="aptftpcleanup"