[CentOS-mirror] 4.3 free drive space

Zenon Panoussis centos at provocation.net
Sat Mar 18 05:44:55 UTC 2006

William Dunn wrote:

> Lock files are a good thing (tm).  I'm sure there's a better way to do
> it, but I'm doing the following:

> if [ -f /some/path/lockfile ]
> then
> exit

The downside of lockfiles is that if your script crashes they
stay behind and keep blocking until you realise it and remove
them manually. A somewhat better way to do this could be to
look for the process. Something like

lock=`/bin/ps auxwww |/bin/grep rsync |/bin/grep msync.centos.org`
if [ -n "$lock" ]


More information about the CentOS-mirror mailing list