[GLLUG] Scripting Ideas

Matt Fuerst fuerstma@msu.edu
Fri, 28 Jun 2002 20:29:56 -0400


Hi all,

I got ISDN service in my new house 'cause DSL and Cable haven't made their
way here yet <sigh>.

To that end I bought a 3COM OfficeConnect LAN modem... this unit offers a
telnet internet along with the default browser interface.

Anyways, the goal:  Have my linux boxen update dyndns.org with my new ip
address when I am forced offline, (happens periodically) reconnected and
received a new IP...

To this end, I expect to create a script to do the following:

Telnet into the OCLM (192.168.1.1) run the command 'stats c' which spits out
a gooble of good information, most notably our IP address in hex. So I will
need a way to parse out that IP (it's always going to be located on the 7th
line, 7 characters in), then send my update to dyndns.org. I think
dyndns.org has published a lot of specs on how to do this so I'm not as
worried about that aspect, what I am worried about is getting that IP
address. I am sure there is a handy UNIX tool to get this info, what should
I look into?

Recommendations are welcome and thanks a ton!

Matt