hostconfig process

Dan Shoop shoop at iwiring.net
Tue Aug 14 18:38:32 PDT 2007


On Aug 14, 2007, at 8:15 PM, R.L. Grigg wrote:

> On Aug 14, 2007, at 4:52 PM, Dan Shoop wrote:
>>
>> On Aug 14, 2007, at 7:43 PM, R.L. Grigg wrote:
>>
>>> On Aug 10, 2007, at 4:06 PM, Justin C. Walker wrote:
>>>>
>>>> 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.
>>>
>>> For example in Sys Prefs under Sharing when you select to enable  
>>> Apple Remote Desktop it modifies the settings in /etc/hostconfig:
>>>    ARDAGENT=-YES-
>>> and then somehow enables it without a reboot. I assume by  
>>> restarting some process. Just wondering which one? Or is there a  
>>> simpler way to do this.
>>
>> Actually you're misinterpreting that.
>>
>> When you invoke System Preferences to enable ARD it writes the  
>> value to hostconfig (so the system knows to start it next time)  
>> but also goes ahead and starts the agent through kickstart. The  
>> affect of changing the qualifier in hostconfig is a side effect  
>> not the change itself.
>>
>
> Yes thats what I was wanting to be clear about. The hostconfig file  
> is modified, the ARDAgent process gets kickstarted, its relaunched,  
> and reads the modified hostconfig file to know what to do.

:sigh:

Except that it's that last part that is in error. It does not re-read  
hostconfig, it just writes to it, that's only read at system startup.  
`kickstart` is the name of the ARD program that starts ARD. That is  
kickstart does not need to know about hostconfig *at all* b/c it's  
already what the startup item invokes at system startup iff[sic] this  
value was set in hostconfig. That is hostconfig is *only* checked at  
system startup. (Or a startup item is invoked through systemstarter.)


> Similarly if I enable 'Remote Login' in Sys Prefs I notice it  
> doesn't modify hostconfig but /System/Library/LaunchDaemons/ssh.plist.

Correct. Because that's handled by launchd.

> What process does Sys Prefs kickstart to get this change into effect?

:larger sigh:

It doesn't.

RTFM about launchd. Setting launch to do something has launchd handle  
it all.

-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