Hi,

On Tue, Feb 12, 2013 at 05:18:01PM +0200, Marius Gedminas wrote:
> On Sat, Feb 09, 2013 at 11:31:07AM +0100, Andreas Mohr wrote:
> > Hi,
> > 
> > On Fri, Feb 08, 2013 at 03:45:29PM +0100, Stefan Sperling wrote:
> > > So you should definitely wrap svnsync in a tool like lockfile (part of
> > > procmail), or upgrade to 1.7.
> 
> I went with
> 
>   #!/bin/sh
>   lockfile -r500 /stuff/zope-mirror/locks/ADHOC.lock || exit 1
>   /usr/bin/sudo -u syncuser /usr/bin/svnsync sync file:///stuff/zope-mirror
>   rm -f /stuff/zope-mirror/locks/ADHOC.lock
> 
> > Be careful about "solutions" other than lockfile - some of these appear to 
> > be
> > terribly unsafe (some newer Ubuntu-introduced "atomic locking" package
> > comes to mind - which then executes anyway after a measly timeout!).
> 
> Do you remember the name of the package?

Possibly it was the lockfile-progs one, but not sure, couldn't nail
it down any more, sorry.

There seem to be recommendations for flock, since that has clean
behaviour on shell trap etc.

Andreas Mohr

Reply via email to