[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/bpo] dinstall



if $LOCK_STOP exists - exit asap.

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 config/debian/dinstall |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/config/debian/dinstall b/config/debian/dinstall
index d38503c..94787d5 100755
--- a/config/debian/dinstall
+++ b/config/debian/dinstall
@@ -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
 
-- 
1.5.6.5



Reply to: