[maemo-developers] Detecting network route change, acting on changes

From: Hartti Suomela hartti at gmail.com
Date: Sat Apr 24 05:47:06 EEST 2010
There is a dbus event for that, use dbus-monitor to see what event it
exactly is.
Or check the command line script archive of command line widget
Or check Personal IP Address home widget


On Fri, Apr 23, 2010 at 7:29 PM, Matthew Smith <matt at smiffytech.com> wrote:
> Hi Folks
> I have now had my N900 for just over a week - got it doing most of what
> I want and behaving like just another one of my Debian boxes.
> What I would like to be able to do is to detect when the network
> connection/route changes from my home WLAN to any other network (another
> WLAN or 3G.)
> If there is some way of catching this event, I'd like to, on the basis
> of which network I'm on, change my /etc/hosts.
> Currently doing this manually, as connections to stuff in my LAN
> requires different behaviour depending on whether I'm connecting from
> inside or out.  (So my servers are on private IP addresses when I'm
> home, connecting through a public IP address/NAT when away.)
> Can anyone point me to a suitable technique/recipe to do this?  Ideally
> I'd like to do what is required in shell or Perl as I have yet to get my
> head around Python and lack the time to learn at present.
> Cheers
> M
> --
> Matthew Smith
> Smiffytech - Technology Consulting & Web Application Development
> Business:      http://www.smiffytech.com/
> Blog/personal: http://www.smiffysplace.com/
> LinkedIn:      http://www.linkedin.com/in/smiffy
> Skype:         msmiffy
> Twitter:       @smiffy
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
More information about the maemo-developers mailing list