[OpenAFS-devel] OSX Preference Pane

Franco Milicchio milicchio@dia.uniroma3.it
Wed, 12 Apr 2006 09:59:31 +0200


On Apr 12, 2006, at 06:33am, Ragnar Sundblad wrote:

>> - /private/etc/hostconfig
>>   Must contain a line OPENAFS=-YES- (or -NO-) in order to set the  
>> start-at-boot flag, like all other services. It makes no sense to  
>> have a service that cannot be turned on and off at boot like all  
>> the other (IMO).
> ...
>
> I think putting it in /etc/hostconfig is a generally bad idea. I  
> didn't
> get if either our program or the user was supposed to change it, but
> either of them may fail in writing it back correctly and that would  
> render
> the entire machine more or less broken. I also think I have heard  
> apple
> saying that they wanted to migrate away from /etc/hostconfig, but I  
> can't
> find that written down anywhere.
>
> You should rather have a preference file of your own, either in
> /Library/Preferences, ~root/Library/Preferences or in /var/db/ 
> openafs/etc.
>
> Arla's configuration/control program has a start/stop button that  
> also writes
> to /usr/arla/etc/startatboot (I think), which contains either "yes"  
> or "no",
> and if it is "yes" Arla will start at boot.

Well, we can put the preference wherever we want. This issue is  
deeper than we think though.

I proposed to move from StartupItems to a launchd item, since the  
first has been ``deprecated'' by Apple. This proposal in my opinion  
has to be taken into account for mainly two reasons. The first, since  
Apple says ``we strongly recommend'' to use launchd for tiger and  
following OSs, see http://developer.apple.com/documentation/MacOSX/ 
Conceptual/BPSystemStartup/index.html. The second, a StartupItem is  
just system-wide, running at boot or not. No specific per-user  
control or run-on-demand.

For the first reason, I think launchd wouldn't be a bad idea. For the  
second reason, if we provide a per-user setting, we must copy the  
startupitem to ~/Library/StartupItems, and provide there a start-at- 
boot flag.

Everything is possible, but if you make me know which solution is  
preferred, I can change the panel. Now I think we could:

- at installation, copy a system-wide startup item
- introduce StartupItem/OpenAFS/startAtBoot which contains  
OPENAFS=YES or NO (remove from hostconfig)
- introduce a preference pane with per user preferences and system  
wide settings
- copy the startup item to the user's home, and make the script  
flexible with system/user settings

Another question: is afs system wide or per-user? To me, it makes no  
sense to have a per-user setting, but I don't know other thoughts...

Any proposal/recommendation?


--
Franco Milicchio <milicchio@dia.uniroma3.it>

The optimist thinks this is the best of all possible worlds.
The pessimist fears it is true.      [J. Robert Oppenheimer]