Re: Run a script when a connection is created?

On Tue, 2011-01-04 at 21:43 +0100, Ma Begaj wrote:
> 2011/1/4 Paul Smith <paul mad-scientist net>:
> > Is there any advanced feature of NM that will have it invoke a script
> > when a new connection is created?  Most specifically I'm interested in
> > replacing the default handling of /etc/resolv.conf updates with my own
> > handling.
> put a script in /etc/NetworkManager/dispatcher.d/ and chmod +x the script
> #!/bin/sh
> if [[ $2 == 'up' ]]; then
>     # do what you want
> fi

Ah that's good info, thanks.  I was hoping that I'd get more details on
the connection in addition to the device name, such as the DNS details
(search domain(s) and server(s)).  Nothing like that available I

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