Scripted access to sentral repository

From: Johan Hartzenberg (jhartzen@csc.com)
Date: Fri May 30 2003 - 04:14:16 EDT


Has anybody implemented file locking via shell scripts?

I need an effective way to allow multiple hosts to collect some data
locally and then dump it into a structured repository shared via NFS, which
means I will nead some form of file locking.

I would like to avoid race conditions from statements like the following:

[ ! -f $REPOSITORY/.lockfile ] && touch $REPOSITORY/.lockfile &&
MergeRepository && rm $REPOSITORY/.lockfile

Any ideas?
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:29 EDT