SPUG: Get the local IP address?
bri at ifokr.org
Sat Jul 23 08:15:30 PDT 2005
> This script is going to run only in a controlled situation.
> It's part of my system imaging process, which requires that the system
> is registered in DNS by the IP of the network card which is in use,
> and there will be only one NIC in use during the build process. Which
> in turn gets it's IP from reserved DHCP.
> So, even though it may have multiple interfaces it will have only one
> address assigned, and that address will have only one hostname
> associated with it. I need that hostname so I can set the hostname of
> the system during the build.
Well, if you've got a box that houses the packages while the build is
occuring, slap a program (cgi, or just a daemon vi xinetd, etc) to
tell it who it is. It just needs to check the client addr of the
socket (which is your being-built box) and that's guarenteed to be
the IP address.
Brian Hatch You're having delusions
Systems and of grandure again.
Security Engineer Well, if you're going to
http://www.ifokr.org/bri/ have delusions, might as
well be the satisfing kind.
Every message PGP signed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mail.pm.org/pipermail/spug-list/attachments/20050723/c87c971d/attachment.bin
More information about the spug-list