Re: Run a script when connection goes down?

On Mon, 2005-11-07 at 08:14 -0500, David Zeuthen wrote:
> On Mon, 2005-11-07 at 13:31 +0100, Martin Høy wrote:
> > Hello all,
> > 
> > At my company, we place a lot of common software on NFS-shares.
> > These shares are mounted, and the directories placed in $PATH when
> > the clients are connected to our network.
> > 
> > The trouble begins when someone disconnects their ethernet-cable,
> > since a lot of directories in $PATH is no longer accessible.
> > 
> > Is it possible to make NetworkManager run a s script when a connection
> > is lost? If so, it would be fairly easy to create a script to umount the NFS-
> > shares when the connection to the NFS-server is no longer available.
> IIRC, it should be possible to listen on the system message bus for
> signals from either the NetworkManager or NetworkManagerInfo service to
> do this. Ideally we'd include an example program with NetworkManager
> that shows how this can be done - in Python it is probable no more than
> 10-20 lines.

Doesn't the Dispatcher exist for this? Are there any docs about the

Ruben Vermeersch (rubenv)

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]