]> git.decadent.org.uk Git - dak.git/commitdiff
cron.unchecked: improve error message if locking fails
authorTorsten Werner <twerner@debian.org>
Fri, 7 Jan 2011 19:32:58 +0000 (20:32 +0100)
committerTorsten Werner <twerner@debian.org>
Fri, 7 Jan 2011 19:32:58 +0000 (20:32 +0100)
Signed-off-by: Torsten Werner <twerner@debian.org>
config/debian/cron.unchecked

index e4bfe54468f91f0be1894c89e458491f5745e0d1..83372f98e0b4186b4f477e341516bfe77528ea90 100755 (executable)
@@ -94,7 +94,10 @@ export LC_ALL=C
 #rm -f "$LOCK_NEW"
 
 # only run one cron.unchecked
-lockfile -r8 $LOCKFILE || exit 0
+if ! lockfile -r8 $LOCKFILE; then
+    echo "aborting cron.unchecked because $LOCKFILE has already been locked"
+    exit 0
+fi
 trap cleanup 0
 
 do_newstage