hostconfig process
Dan Shoop
shoop at iwiring.net
Tue Aug 14 16:50:08 PDT 2007
On Aug 14, 2007, at 6:19 PM, Jerry LeVan wrote:
>
> On Aug 14, 2007, at 4:11 PM, Dan Shoop wrote:
>
>>
>> On Aug 11, 2007, at 4:04 PM, Jerry LeVan wrote:
>>
>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> ---
>>>>
>>>> Message: 1
>>>> Date: Fri, 10 Aug 2007 16:06:09 -0700
>>>> From: "Justin C. Walker" <justin at mac.com>
>>>> Subject: Re: hostconfig process
>>>> To: omniadmin OSX <macosx-admin at omnigroup.com>
>>>> Message-ID: <FAED86C8-BF06-46FF-A6EA-8A9347EC13A2 at mac.com>
>>>> Content-Type: text/plain; charset=US-ASCII; delsp=yes;
>>>> format=flowed
>>>>
>>>>
>>>> On Aug 10, 2007, at 11:11 , R.L. Grigg wrote:
>>>>
>>>>> Theres a remote OSX 10.4.10 system that I administor by ssh, and
>>>>> after I modify /etc/hostconfig, what process do I need to kill -
>>>>> HUP
>>>>> to have it read up the new settings so I dont have to reboot it
>>>>
>>>> You need to reboot to have this file re-scanned. In essence, it
>>>> provides a lot of basic settings for the system (processes that may
>>>> run only at boot-time, or long-lived processes that have nothing to
>>>> do with the boot process) to use, and without restarting the whole
>>>> system, you won't get what you want.
>>>>
>>>> This may have changed in recent releases, but AFAIK, this is the
>>>> still the case.
>>>>
>>>> Justin
>>>>
>>>
>>> Have you tried "hostname -s newnane" (and setting the host name
>>> in hostconfig).
>>
>> Have you read hostconfig???
>>
>> There's a lot more it defines than hostname. It defines global
>> variables that are use by SystemStartup items and many other things.
>>
>> Also hostname set like that won't stick, and can change even while
>> the system is booted, because it's just plain the wrong way to set
>> it.
>>
>>
>> -dhan
>
> Chill out dan, try to focus on solutions rather than criticisms...
The critiquing process is how peers learn from their peers and work
and analysis is reviewed. If you can't stand for critical analysis of
your work you have no place in the sciences, including computing
sciences. Through such critique bad practices are revealed dn
confirmation gained for good practices. This is the value of critical
review, a hallmark of the scientific process.
Since hostconfig is used for a wide variety of things, focusing on
setting hostname through other means misses the question entirely.
It's a non-sequitur; you might as well have told him how to tie his
shoes. (I'm presuming you'd have gotten that right, while your advice
here is not only off topic but outright wrong.)
/etc/hostconfig is read by rc files and every instantiation of every
SystemStartup item.
Moreover using even hostconfig to set hostname has not only been
depreciated in Tiger it is specifically stated by Apple as something
*not* to do. Apple specifically states that no setting (other than -
Automatic-) for hostname be in hostconfig for Tiger and beyond. See
technote 303697 where they even go so far as to bold the word "not"
in a whole subsection titled "Leave hostname alone."
But far more poignantly using `hostname` to set set the hostname
under OS X at all is completely off the mark and has never been the
correct method to set this parameter. Not only does it not provided
persistence across reboots but it won't even hold for any running
instance of the OS. It could therefore change very in-expectantly and
to great damage. (And it will, just trigger any change in networking.)
The correct method for setting hostname is to use `scutil --set
HostName <FQDN>` instead or `changeip` if running OS X Server. Only
then will it get properly registered by the OS and maintain persistence.
> [mbp:~]$ uname -a
> Darwin mbp 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00
> PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
> [mbp:~]$ ping mbp
> PING mbp (192.168.1.80): 56 data bytes
> 64 bytes from 192.168.1.80: icmp_seq=0 ttl=64 time=0.052 ms
> 64 bytes from 192.168.1.80: icmp_seq=1 ttl=64 time=0.093 ms
> ^C
> --- mbp ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 0.052/0.072/0.093/0.021 ms
> [mbp:~]$ sudo hostname jack
> [mbp:~]$ uname -a
> Darwin jack 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23
> 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
> [mbp:~]$ ping jack
> PING jack (192.168.1.80): 56 data bytes
> 64 bytes from 192.168.1.80: icmp_seq=0 ttl=64 time=0.046 ms
> 64 bytes from 192.168.1.80: icmp_seq=1 ttl=64 time=0.092 ms
> ^C
> --- jack ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 0.046/0.069/0.092/0.023 ms
> [mbp:~]$ sudo hostname mbp
>
I fail to see how that properly demonstrates anything other than
example of something not to do. It certainly isn't persistent nor
does it register the change with the OS. It's in fact dangerous.
As for being "chill", you presume I maintain anything but a frosty
demeanor on this side of the screen. ;)
-dhan
------------------------------------------------------------------------
Dan Shoop <shoop at iwiring.net>
Tactical Operations Center: 1.866.901.8787 (24x7)
Ph: 714.363.1174
AIM: iWiring
More information about the MacOSX-admin
mailing list