]> git.decadent.org.uk Git - dak.git/commitdiff
dinstall
authorJoerg Jaspert <joerg@debian.org>
Sat, 21 Feb 2009 20:43:27 +0000 (21:43 +0100)
committerJoerg Jaspert <joerg@debian.org>
Sat, 21 Feb 2009 20:43:27 +0000 (21:43 +0100)
if $LOCK_STOP exists - exit asap.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/debian/dinstall

index d38503cedbd8f7870b620051360640b6792e00f6..94787d5c2b302e6e4bf76597db3308add3dd0a90 100755 (executable)
@@ -385,6 +385,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 +403,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 +456,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