On Mon, Jul 01, 2013 at 02:11:06PM +0100, Franco Martelli wrote: > This is my network situation, recently I bought a 3G router providing > internet connection to my network (an amd64 Desktop PC with Wheezy and > a Linksys NSLU2 de-underclocked with armel Squeeze). I would like to > run some scripts when 3G router gets connected to the Internet. > Using nmap program I notice that a TCP/IP service become available as > soon as 3G router gets connected so I thought to use it as a trigger > for a daemon program that checks an IP address for available services > then automatically it runs scripts. > Does it exist such a daemon program out there? Should I write a shell > script using some network utility?
apt-get install whereami this can run shell commands/scripts based on your network location to set up your machine for whatever network you end up on. Generally, this is triggered by the presence of "link light", wireless access points, ip/mac addresses reachable etc, so this should suit you. But I do not think it will cover the corner cases where the remote service is re-started... Most of the stuff can be taken care of by DHCP itself, but if you want to e.g. change your default SMTP gateway, reconfigure local proxy, do custom "stuff", then whereami does come in handy. Hope this helps -- Karl E. Jorgensen -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20130701131956.GB15076@hawking