jos at catnook.com
Thu Jun 20 10:04:03 EST 2002
On Thu, Jun 20, 2002 at 03:03:53PM +0100, matthew.2.burgess at bt.com wrote:
> ps -ef | grep 'rsync' | grep -v 'grep rsync' | grep -v 'rsync.sh' >
> if [ $? -eq 1 ]; then #rsync isn't running - let's launch it now
> rsync [opts] user at host::/module/* .
> echo "Rsync is still running...please wait and try again later"
Note that this approach inherently suffers from a race condition: what if
rsync was started right after running the ps? Adrian's setlock idea avoids
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/ _/ _/
jos at catnook.com _/_/ _/_/_/ use Std::Disclaimer;
More information about the rsync