[Vm-dev] Finding ip address for eth0?
bert at freudenbergs.de
Wed Aug 26 22:18:21 UTC 2009
On 27.08.2009, at 00:15, Andreas Raab wrote:
> David T. Lewis wrote:
>> Assuming that you're not looking for an elegant solution, you could
>> figure it out in the start script and pass it to Squeak as a command
>> line parameter.
>> IPV4_ADDR=`/sbin/ifconfig $INTERFACE | grep 'inet addr' | cut -
>> echo the IP address on interface $INTERFACE is $IPV4_ADDR
>> /usr/local/bin/squeak myimage.image $IPV4_ADDR
> Wow, without sed? I'm impressed ;-) And you know what, that's just
> what I'll do. Thanks for the snippet.
You might want to set LANG=C in the script. Or be surprised when
running this on a localized machine.
- Bert -
More information about the Vm-dev