Re: Patch for anonftpsync to use lockfile-progs
[this got bounced to debian-www, and now to debian-mirrors]
On Wed, Nov 29, 2006 at 03:08:59PM +0100, Steffen Kaiser wrote:
> Attached patch adds the detection, whether lockfile is present, or the
> lockfile-progs are available. (If you install something like "lockfile" in
> Sarge, it will be that package as it is the nearest match, I guess).
>
> When both are absent, it uses dump locking using test -e $LOCK and touch
> $LOCK.
As far as that last thing is concerned, this is what I do:
if [ -f "$LOCK" ]; then
if [ "`find $LOCK -maxdepth 1 -amin -360`" = "" ]; then
echo "stale lock found (not accessed in the last 6 hours), forcing update!"
rm -f $LOCK
else
echo "current lock file exists, unable to start rsync!"
exit 1
fi
fi
touch $LOCK
Of course, if you're still actually syncing after six hours, you'll get a
duplicate rsync running, but in that case you might not want to be running
such a mirror anyway.
> The changes are, of course, GPL.
Since the distribution method is putting it onto www.debian.org, you
actually have to release them under the Open Publication License instead :)
cf. http://www.debian.org/license
--
2. That which causes joy or happiness.
Reply to: