[OpenAFS-port-darwin] 1.5 and OSX services

Franco Milicchio milicchio@dia.uniroma3.it
Mon, 13 Mar 2006 14:52:21 +0100


Hi everybody.

I was hacking OpenAFS scripts in order to make it possible for a user  
to start or not the service at boot (mainly for laptop users), and I  
began to read more about OSX service startup.

The StartupItems way is unfortunately deprecated, and launchd must be  
used from 10.4 instead of any other method (inetd, xinetd, ...). I  
succeeded to hack the script to load afs checking /etc/hostconfig  
with a custom variable OPENAFS=-YES-, and at the top of StartService 
(), checking with if [ "${OPENAFS}:=YES" = "-YES-" ]; then start else  
exit, the user preference (at boot). Still, SystemStarter start/stop  
"AFS" works.

What do you think about moving to the correct way of handling  
daemons? Handling just start-at-boot-or-not, nothing more, since AFS  
is not so prone to on-demand things :)

I began also looking at all the afs configuration files and I  
produced a simple preference pane, so that it would be possible for a  
``simple'' user to set some configuration items without many hacks.

Last, I checked out the new package maker, and from 10.4 we have more  
control, and I feel that the good-old-way is deprecated, just like  
startup items. What do you think? I think it would be possible to  
leave pre-10.4 packages and introduce the new one...

Any comments are very welcome.

--
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]