Re: postinstall scripts not executing
Re: postinstall scripts not executing
- Subject: Re: postinstall scripts not executing
- From: Karl Kuehn <email@hidden>
- Date: Mon, 18 Aug 2008 08:21:29 -0700
On Aug 18, 2008, at 7:51 AM, Nigel Kersten wrote:
LoginHooks are a method that should really only be used in packages
for installations where you have control over all the clients who
will install your package. If you don't have this control, you
should be using a LoginItem (esp now we have a sanctioned method for
programmatically adding them) or a LaunchAgent (if you're targeting
10.5 and thus they actually work. Mostly.)
Sure, LaunchAgents should be able to cover most of the functionality
of LoginHooks, but LoginHooks do run earlier, and have some
advantages such as the easy access via $1 of the user who is logging
in.
To make a small counter-point: LaunchAgents run in the context of the
user, so if you need to know the name of the user you just execute `/
usr/bin/whoami`. And most of the things you would do that for are moot
since you are already executing as the proper user (~ just works).
But there are real advantages to loginhooks as you say (run as root,
and run early so you can do things like mount or fiddle with home-
directories).
I'm not sure what Scott means by a non-system wide LoginHooks.
There's no such thing? All LoginHooks run for all users if
LoginHooks have been enabled.
You can enable MCX login hooks (and have multiple of them), and those
will only run for the user/group/computer/computergroup for which they
are set.
There seems to be a lot of confusion around the interweb about the
difference between LoginHooks, LoginItems and LaunchAgents....
Any thoughts on where there might be a good place to put a wiki page
about this that a number of us can fiddle with to get right? It is
annoying that this information is so scattered.
--
Karl Kuehn
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden