Received: Mon, 31 May 2004 19:55:07 +0900
And lo, David wrote:

> nobu.nokada / softhome.net wrote:
> >   count = 0
> >   until unmount("/usr") && unmount("/usr2")
> >     case count += 1
> >     when 1
> >       system "/etc/init.d/httpd stop"
> >       system "/etc/init.d/squid stop"
> >     when 2
> >       kill("rdiff-backup", :TERM)
> >       sleep 3
> >     when 3
> >       kill("rdiff-backup", :KILL)
> >       sleep 3
> >     end
> >   end
> 
> Thanks to all. I like this one best :-) The 1, 2, 3, ... clearly shows 
> the increasing step (from less to more extreme) which I would take to 
> meet the condition.
> 

By the way ...
If you're looking for processes that have files open on a mounted partition ... check the manual page for lsof

lsof # shows all open sockets (files, network, etc) used by programs.
lsof /usr # will show all programs that have open files (and what files they are) inside the filesystem of /usr

- Greg