[OpenAFS-port-darwin] 1.5 and OSX services

Sebastian Hagedorn Hagedorn@uni-koeln.de
Tue, 14 Mar 2006 16:46:08 +0100


--==========A63BA0F341367452C527==========
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

--On 13. M=E4rz 2006 14:52:21 +0100 Franco Milicchio=20
<milicchio@dia.uniroma3.it> wrote:

> 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, ...).

"must" is too strong a term. The other methods still work just fine, but I=20
think that launchd offers advantages going forward.

> I
> succeeded to hack the script to load afs checking /etc/hostconfig  with a
> custom variable OPENAFS=3D-YES-, and at the top of StartService (),
> checking with if [ "${OPENAFS}:=3DYES" =3D "-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 :)

Actually on my Mac at home I regularly load and unload AFS, because the way =

it works right now it tends to get in the way. So I only run it when I=20
actually need it. Note that you can do the same with all other daemons as=20
well! With launchd that's just  "launchctl start" and "launchctl stop"=20
instead of "/Library/StartupItems/.../... start" etc.

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

That's very cool! I think this would improve the user experience =
enormously.

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

I don't know anything about that. Do you have any pointers?

Cheers, Sebastian Hagedorn
--=20
     .:.Sebastian Hagedorn - RZKR-R1 (Geb=E4ude 52), Zimmer 18.:.
Zentrum f=FCr angewandte Informatik - Universit=E4tsweiter Service RRZK
.:.Universit=E4t zu K=F6ln / Cologne University - Tel. +49-221-478-5587.:.
                   .:.:.:.Skype: shagedorn.:.:.:.
--==========A63BA0F341367452C527==========
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEFuVAGXsGmU0QW0URAlHjAKCT7rMorO4aPG2CACFzR5kJyeFcugCgs1RL
k3WW64eQpdopO6QcuKDjFfc=
=yuFi
-----END PGP SIGNATURE-----

--==========A63BA0F341367452C527==========--