]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
fix lock removal in dinstall
[dak.git] / config / debian / dinstall.functions
index 98972e6df0559f845dd4d1d5ffb211040b44965f..605dd2b907cd6b8376d58fd2effea2ddf36b1b00 100644 (file)
@@ -4,10 +4,14 @@ function ts() {
         echo "Archive maintenance timestamp ($1): $(date +%H:%M:%S)"
 }
 
-# Cleanup actions
+# Remove all locks
+function remove_locks() {
+    rm -f $LOCK_DAILY $LOCK_ACCEPTED $LOCK_NEW
+}
+
+# trap handler for cleaning up on signal / error
 function cleanup() {
-       rm -f ${LOCK_DAILY}
-       rm -f ${LOCK_ACCEPTED}
+    remove_locks
 }
 
 # If we error out this one is called, *FOLLOWED* by cleanup above