[opensuse] Is it possible to run a script automatically when network manager gets a connection?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well, that's it, I would like to run a script of my own at that point. Is it possible? - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlLRlUQACgkQtTMYHG2NR9Xg+wCeM4vXLg6itFNaK8PlZpm0B3Bj ubYAniAU3AkkSkkzmXMegItOILIdz2p0 =uSSf -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 11 of January 2014 20:02:28 Carlos E. R. wrote:
Well, that's it, I would like to run a script of my own at that point. Is it possible?
Yes. Check the scripts in /etc/NetworkManager/dispatcher.d for a template.
Cheers / Saludos,
Carlos E. R.
Regards, Peter -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-01-11 20:08, auxsvr@gmail.com wrote:
On Saturday 11 of January 2014 20:02:28 Carlos E. R. wrote:
Well, that's it, I would like to run a script of my own at that point. Is it possible?
Yes. Check the scripts in /etc/NetworkManager/dispatcher.d for a template.
Thanks. Mmm... I need to see more samples to find out what they can do... compared to /etc/ppp/ip-up, they seem too limited. -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar)
El 11/01/14 16:02, Carlos E. R. escribió:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Well, that's it, I would like to run a script of my own at that point. Is it possible?
what *exactly* are you trying to accomplish ? "when network manager gets a connection" is ambiguous at best, misleading at worst. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Saturday, 2014-01-11 at 19:50 -0300, Cristian Rodríguez wrote:
El 11/01/14 16:02, Carlos E. R. escribió:
Well, that's it, I would like to run a script of my own at that point. Is it possible?
what *exactly* are you trying to accomplish ?
"when network manager gets a connection" is ambiguous at best, misleading at worst.
Cosas :-) Ok, I'll explain my little idea. I'm using on my laptop, since recently, dnsmasq. The configuration is the following: - In network manager, I say that I want to use DNS server at 127.0.0.1 - In /etc/dnsmasq.conf I have: server=8.8.8.8 server=8.8.4.4 I can not set a configuration different for each network site I'm at, for dnsmasq, it is a static config. However, on some sites, I might want to use the available router (the IP can be different each time), at others something different, like the dns recommended by dhcp... so my little idea was to automatically edit "/etc/dnsmasq.conf" on connection up to add the appropriate dns server. Maybe taken from a list of configs. For this I need to on the script to obtain data about the connection: the /etc/ppp/ip-up script got several interesting parameters on the command line. I don't know if those on "/etc/NetworkManager/dispatcher.d/" can get the same data set. Another thing I may want (I haven't thought this one out yet) is when using dhcp have the setting written to dnsmasq, and reset th resolv file to the 127. address. - -- Cheers, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlLR/ewACgkQtTMYHG2NR9VMGgCeMDxciQU5r3S4vfCz5BPpwDzr uLcAn1Jyj/ZUnUqO5zoZCqPU83r0cw0T =FCjI -----END PGP SIGNATURE-----
participants (4)
-
auxsvr@gmail.com
-
Carlos E. R.
-
Carlos E. R.
-
Cristian Rodríguez