From: Joerg Jaspert Date: Sat, 21 Feb 2009 20:43:27 +0000 (+0100) Subject: dinstall X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=ec5100af7a8af8c6a75b17e0b3c098ffcfd4d4e4;p=dak.git dinstall if $LOCK_STOP exists - exit asap. Signed-off-by: Joerg Jaspert --- diff --git a/config/debian/dinstall b/config/debian/dinstall index d38503ce..94787d5c 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