Re: Executing commands at home and elsewhere
- From: Kjetil Kjernsmo <kjetil kjernsmo net>
- To: NetworkManager-list gnome org
- Subject: Re: Executing commands at home and elsewhere
- Date: Mon, 25 Jun 2007 22:24:58 +0200
Hi and thanks for the quick reply!
I was meaning to start working on it, but the Real World came in and
interferred, anyway, here we go. :-)
On Tuesday 19 June 2007, Darren Albers wrote:
> On 6/19/07, Dan Williams <dcbw redhat com> wrote:
> > There's a tool called NetworkManagerDispatcher that calls scripts
> > in /etc/NetworkManager/dispatcher.d when connections go up and down
> > that most people use for this sort of thing, actually.
> Here is one list (Though it is somewhat short since I haven't seen
> any posted lately):
> http://www.darrenalbers.net/wiki/index.php?title=NetworkManagerScript
>s
>
> I think what you want is to use something whereami in conjunction
> with NetworkManagerDispatcher.
Great stuff, this is what I'm looking for, for sure.
whereami seems to have everything I have looked for in terms of
determining where I am. So, what remains is just executing scripts
depending on the location.
NetworkManagerDispatcher will only execute the scripts in the first
level /etc/NetworkManager/dispatcher.d directory, right, not descend
into subdirs?
So, I was thinking about a setup similar to the Apache 2 setup on my
box, i.e. create /etc/NetworkManager/dispatcher.d/scripts-available
and /etc/NetworkManager/dispatcher.d/scripts-enabled and in the latter
again subdirs for each of the locations, given the same names as in the
whereami config, which would symlink to the actual scripts to be
launched at each location
in /etc/NetworkManager/dispatcher.d/scripts-available
This would allow for relatively straightforward setups in the supposedly
common case that there are several actions that would be in common for
different locations, but not all.
Does that sound like a reasonable approach?
Kjetil
--
Kjetil Kjernsmo
Programmer / Astrophysicist / Ski-orienteer / Orienteer / Mountaineer
kjetil kjernsmo net
Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]