Re: postinstall scripts not executing
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=explanatorygap.net; h=Received:Cc:Message-Id:From:To:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:X-Mailer:X-Identified-User; b=ci4RoBlzNAkyN0ykJfzbSWZjdMnuglkAElMyHiVaTXJzKEAPZyz66wfNxIKJ33qw2QlBHea8E2sCFcMWS7sspEwvh6+sOTRAjMBfxY9Pl/tqjVq1KLLdnrEeaxjcbxuG; I think you've summarized it nicely. On Aug 18, 2008, at 6:31 AM, Gignac, Jason (HAS-SAT) wrote: On 8/18/08 Monday, August 18, 2008 -7:09 AM, "Scott Russell" <ScottRussell@nd.edu> wrote: The advantage to a kludge like this is that it is not a system-wide loginhook so sysadmins shouldn't complain. However, I think we all know the BEST answer is to write the application correctly to set prefs on first launch from an internal mechanism. Best wishes, Scott -- Dr. Scott Russell IT Support Engineer/Consultant Arts & Letters Computing, Distributed Support Services, Office of Information Technologies, University of Notre Dame Instructor of Horn, University of Notre Dame and Saint Mary's College Assistant Horn, South Bend Symphony Orchestra 234 Decio Hall 574-631-7021 ScottRussell@nd.edu http://www.nd.edu/~srussel2/ On Aug 17, 2008, at 5:51 PM, Stéphane Sudre wrote: On Aug 17, 2008, at 7:08 PM, Scott Russell wrote: Instead of login hooks, isn't the correct mechanism going forward a launchd item in /Library/LaunchAgents/ anyway? User-specific, runs at login ... sounds like a login hook to me. *shrug* Can the answer be no? LaunchAgents are only working on 10.5 and later (in 10.4 they are not working correctly at all). Additionally: - LaunchAgents are for repetitive tasks. Setting default preferences is a one-shot operation. - There is no guarantee that a LaunchAgent item will be launched before your app. LoginItems can be launched before a LaunchAgent item. They can already be launched before a LaunchDaemon item. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/nigel%40explanatorygap.... _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... 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. 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. There seems to be a lot of confusion around the interweb about the difference between LoginHooks, LoginItems and LaunchAgents.... Forgive me for being unclear - The problem, I think, that we're running into, is that you have two types of people building packages, here: Developers and Admins. As an Admin myself (I'm not smart enough to be a developer! ;) ), I'm building packages tailored to my specific environment. This means I have the disadvantage of havign no control over the source materials I have to deal with (which leaves me doing things like hacking in preference files to register the product because the developer didn't design for Enterprise deployment, for instance), but with an extremely controlled evironment to roll out my packages to. A developer, essentially, has the opposite set of constraints. Maybe that's the root of this disagreement. I wouldn't 'ship' any of my packages, because they are usually not even my software. And when possible, I CERTAINLY prefer to do things the 'right' way, because it will invariably happen that something in my environment will change later on. But, sometimes, I have to do things the wrong way to get them done. Curse of the Admin. This specific question aside -- in the grander scheme of things, as we go forward, shouldn't we be dropping the idea of loginhooks in favor of LaunchAgents? http://lists.apple.com/mailman/options/installer-dev/jason.gignac%40pearson....
m This email sent to jason.gignac@pearson.com This email sent to nigel@explanatorygap.net This email sent to site_archiver@lists.apple.com
participants (1)
-
Nigel Kersten