10.8 host names and dscl
I have just upgraded from 10.6 to 10.8 and I'm having trouble with host names for the other devices on my network.
Under 10.6 (and 10.5) I had used the dscl command to set names for other devices on my local network using directory services rather than directly editing the hosts file eg:
$ sudo dscl localhost -create /Local/Default/Hosts/my_host IPADDRESS 192.168.0.1
$ sudo dscacheutil -flushcache
$ dscl localhost -list /Local/Default/Hosts
my_host
I've tried this on 10.8 and while the dscl command doesn't return an error and the directory service shows that the information is in there, but I am not able to use the name "my_host" to access the device, the IP address does not resolve.
My hosts file has not been changed from the default.
Is this a "feature" of 10.8 (ie a bug) or has the dscl command changed or is the directory service no longer the recommended way to do this and I should be editing the hosts file directly?
Thanks for any help or advice!
Tom
iMac 24" 2.8GHz, Mac OS X (10.6.2), 4GB SDRAM, 320GB