]> err.no Git - dak/commitdiff
secure show-new by unchecked.log
authorTorsten Werner <twerner@debian.org>
Tue, 4 Jan 2011 19:06:28 +0000 (20:06 +0100)
committerTorsten Werner <twerner@debian.org>
Tue, 4 Jan 2011 19:06:28 +0000 (20:06 +0100)
... to avoid parallel execution of dak

Signed-off-by: Torsten Werner <twerner@debian.org>
config/debian/cron.hourly

index 30e81b59e0d8a20af82871e1ed56117272133f7b..ccfbe38c25c656527bb0a9d4306f578ab4cf6df0 100755 (executable)
@@ -12,7 +12,13 @@ dak import-users-from-passwd
 dak queue-report -n > $webdir/new.html
 dak queue-report -8 -d new,byhand,proposedupdates,oldproposedupdates
 dak show-deferred > ${webdir}/deferred.html
-dak show-new > /dev/null
+
+# do not run show-new and other stuff in parallel
+LOCKFILE="$lockdir/unchecked.lock"
+if lockfile -r16 $LOCKFILE 2> /dev/null; then
+    dak show-new > /dev/null
+    rm -f $LOCKFILE
+fi
 
 cd $webdir
 cat removals-20*.txt > removals-full.txt