plugwash / raspbian-tools

10 stars 3 forks source link

Add a --nolock option to raspbmirror. #5

Closed mutability closed 3 years ago

mutability commented 3 years ago

We need to run raspbmirror on a freebsd box that has the target directory NFS-mounted, where flock will not work:

Traceback (most recent call last):
  File "/usr/local/bin/raspbmirror.py", line 48, in <module>
    fcntl.flock(lockfd,fcntl.LOCK_EX | fcntl.LOCK_NB)
OSError: [Errno 45] Operation not supported

--nolock lets us move the mutual exclusion outside the script.