Re: Run a script when a connection is created?
- From: Paul Smith <paul mad-scientist net>
- To: Ma Begaj <derliebegott gmail com>
- Cc: networkmanager-list gnome org
- Subject: Re: Run a script when a connection is created?
- Date: Thu, 06 Jan 2011 11:03:48 -0500
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
>
> example.sh:
> #!/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
suppose?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]