[Pharo-project] NetNameResolver localHostName - Mac OS always returns an ip address string

Nick Ager nick.ager at gmail.com
Tue Apr 26 20:20:54 CEST 2011


Hi,

When I call the following on my Mac:

NetNameResolver localHostName


the result is an ip address string eg '192.168.4.174'

Is there some configuration work required on the Mac to ensure that
#localHostName returns a name rather than ip address.
Currently:

$ hostname
Nick-Agers-MacBook-Pro2.local

$ cat /etc/hosts
cat /etc/hosts
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

I'd be happy with #localHostName returning the hostname or an entry in
/etc/hosts

I've tested on Pharo 1.1.1 & 1.2.1 both using a COG vm

Thanks

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110426/8a8b9fa9/attachment.htm>


More information about the Pharo-project mailing list