On Wed, May 13, 2009 at 10:27:16AM +0200, Philippe ENTZMANN wrote: > Hello, > > I am writing scripts to automate some tasks in my Ubuntu LTSP server. > To be clean, I need to guess the IP address of the server (the one used by > clients) and also the network device (/dev/eth0 for example) used for the > client network and the network device used for the Internet access. > > I can parse some conf file but is there a better/unified approach to get > those informations ? > > PS : Scripts will run on server side
Some things that come to mind: run ifconfig read /etc/hosts read /etc/network/interfaces read dhcpd.conf run 'hostname' followed by 'nslookup <Server: line of output of hostname>' --this will get you partway there: nslookup `hostname` | grep Server: -Rob ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net
