Skip to content
This repository
Browse code

Change the way the mount-alter.sh lock file is managed

Move the lock used by mount-alter.sh to the Nimbus installation. The
file is already created with permissions 644. Finally, change the
flock call to open the file for reading instead of writing.

With these changes, we will be able to share the lock file between
root-owned processes and nimbus-owned processes. The write->read
part is not mandatory, it's mainly to detect a wrong installation
where the lock file would be missing (as mount-alter will not create
the file automatically anymore).
  • Loading branch information...
commit 16f6923bc7c78ff8a64c5b69b4d06ddd6bdda929 1 parent 76e6bb8
Pierre Riteau authored July 26, 2010 timf committed July 29, 2010
4  control/libexec/workspace-control/mount-alter.sh
@@ -88,7 +88,7 @@ MOUNT="/bin/mount"
88 88
 UMOUNT="/bin/umount"
89 89
 CP="/bin/cp"
90 90
 
91  
-FLOCKFILE=/var/lock/nimbus.mountalter.lock
  91
+FLOCKFILE=/opt/nimbus/var/workspace-control/lock/loopback.lock
92 92
 FLOCK=/usr/bin/flock
93 93
 if [ ! -O $FLOCK ]; then
94 94
   echo "*** can not find flock program, disabling"
@@ -375,4 +375,4 @@ if [ "$DRYRUN" != "true" ]; then
375 375
   fi
376 376
 fi
377 377
 
378  
-) 200>>$FLOCKFILE
  378
+) 200<$FLOCKFILE
0  control/var/workspace-control/lock/loopback.lock
No changes.

0 notes on commit 16f6923

Please sign in to comment.
Something went wrong with that request. Please try again.