Question
Todd Jordan
tcjordan "at" technologist.com
Tue, 28 Sep 1999 20:00:40 +0000
Don't know if this will help or not. Is the problem because you never
know what the IP will be (because of the DHCP), but you could find it
with by checking eth0's IP? I used this little piece of unix beauty to
solve another problem, but it might help.
Instead of saying eth0, put in:
NOTES:
xxx.yyy = Class B of the IP in which the DHCP assigns IPs (this is only
necessary if you have more than 1 eth card a grep -v 127 would be fine
if you've got 1 eth and lo)
`ifconfig | grep inet | grep xxx.yyy | cut -f2 -d: | cut -f1 -d" "`
If you're curious exactly what this does. Run the one pipe at a time
appending each one to the previous ones.
1) ifconfig
2) ifconfig | grep inet
3) ifconfig | grep inet | grep . . .
etc.
The end result is an IP address (the one to which the eth0 card is
assigned (see note above for clarification).
---------------------------------------------------------------------
The VNC mailing list - see http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------