Thanks but this is not an issue for us. We're talking about an appliance here, a VMware image that we ship to customers. So by definition LANG=C and eth0 is the default interface.
Cheers, - Andreas
John M McIntosh wrote:
Careful, on my macbook pro, the ethernet port is en0, which is rarely used. But en1 is wireless and mostly used so the INTERFACE=eth0 is going to be machine dependent
On 26-Aug-09, at 3:15 PM, 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. #!/bin/sh INTERFACE=eth0 IPV4_ADDR=`/sbin/ifconfig $INTERFACE | grep 'inet addr' | cut -c21-34` 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.
Cheers,
- Andreas
--
John M. McIntosh johnmci@smalltalkconsulting.com Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================