On 6/19/07, Dan Williams <[EMAIL PROTECTED]> wrote:
On Mon, 2007-06-18 at 22:27 +0200, Kjetil Kjernsmo wrote: > Hi all! > > I've pretty much just discovered NetworkManager, as it so neatly started > to light up on my (K)Ubuntu Feisty-based laptop. > > At home, I have set up a file server and a router, and I have an NFS > server running on it. So, my plan is that when my laptop is at home, it > should mount the NFS, start synching over stuff like email, do backups, > etc. If, OTOH, it is not at home, the bandwidth isn't all that good, > and it should only try to mount the drive using SSHFS, and do none of > the synching. > > So, I was writing some scripts to do this, using ARP to check the MAC of > the router to figure out if it was at home. But then I realized I was > reinventing the wheel, and came to the conclusion that this is likely > something that should be done within the NetworkManager framework. > > So, my first question is if this has been done before, and if so how? > And if not, how would one get started to get this running? 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. There's a FAQ and a list of scripts that people have done somewhere that I forget at the moment :) But if you're interested in it, I can try to dig it up for your (or others will before I get to it). Dan > Cheers, > > Kjetil
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=NetworkManagerScripts I think what you want is to use something whereami in conjunction with NetworkManagerDispatcher.
_______________________________________________ NetworkManager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
