X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=config%2Fdebian%2Fdinstall.functions;h=605dd2b907cd6b8376d58fd2effea2ddf36b1b00;hb=3d8fa539bcd54aa937d68dd29ff6d12e04588e25;hp=98972e6df0559f845dd4d1d5ffb211040b44965f;hpb=e6f206b9db963288b90ff02b78fa2bb5c13ea53f;p=dak.git diff --git a/config/debian/dinstall.functions b/config/debian/dinstall.functions index 98972e6d..605dd2b9 100644 --- a/config/debian/dinstall.functions +++ b/config/debian/dinstall.functions @@ -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