Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'tried this...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
tried this...
Authored by: inajar on May 28, '01 04:39:24PM

I tried to set the hostname on my machine like this a few different times in the past two months. It never worked for me. I did find something that did work though.

If you look in the startup items in the system folder for OS X you'll see a Network startup item. If you edit the hostname line in this startup item it will always be correct in the terminal. I haven't had any problems with this method either, like apache not starting correctly etc. Admittedly it would be nicer to find the place where te Network startup item is pulling the hostname variable from and change it there, but I haven't had the time.

cheers,
tim



[ Reply to This | # ]
Re: tried this...
Authored by: blb on May 28, '01 05:06:20PM

I did look a little into this, and what I found is that it uses ipconfig (and the daemon, ipconfigd) to check for a hostname (the exact line is,

ipconfig getoption "" host_name

which, when I run (as root, so add sudo in front if necessary) is that there's nothing. When this happens in the Network startup script, it then falls back to localhost.
The big question, then, is how do you tell ipconfigd to setup a host_name entry? I have yet to stumble onto any docs for ipconfig/ipconfigd.



[ Reply to This | # ]