On Dec 9, 2010, at 3:22 PM, Greg Neagle wrote: On Dec 9, 2010, at 1:06 PM, Don Montalvo wrote: On Dec 9, 2010, at 2:59 PM, Chris Devers wrote: On Thu, Dec 9, 2010 at 3:43 PM, Don Montalvo <email@hidden> wrote:
(Correction: needs to run at start up - not at login)
We have a pkg installer in this directory:
/Library/Scripts/ourpackage.pkg
How do we use launchd to trigger this pkg at startup? It needs to run every time the computer starts up.
Surely this isn't the right way to go about ...well, anything, really. Is it?
What is it that you're really trying to do here?
Without knowing details, would Deep Freeze be a better way to do whatever it is you're trying to do?
http://www.macworld.com/reviews/product/405631/review/deep_freeze_mac_203.htmlDeep Freeze is the tool that, for example, Apple Stores use to enforce that every time the Macs on the sales floor reboot, they revert back to a known state -- so they can let customers bang on the things, drag random stuff to the trash, change preferences, etc, and all they have to do is reboot to get everything back to normal.
I'm not sure what you're trying to do, but it may be that DF or something like it might be a simpler way to enforce that something is made available every time the Mac starts up.
-- Chris Devers
Not really looking to over complicate this. Just looking to run a script at startup using launchd. :)
Thanks, Don
So are you looking for a primer on how to use launchd LaunchDaemons to run scripts at startup? This seems like the wrong list for that. Or are you looking for someone to tell you how to run the installer via a script? Also the wrong list, but at least getting closer...
A hint:
<key>ProgramArguments</key> <array> <string>/usr/sbin/installer</string> <string>-pkg</string> <string>/Library/Scripts/ourpackage.pkg</string> <string>-target</string> <string>/</string> </array> -Greg
Hi Greg,
We're able to trigger the pkg with a script. Just wasn't sure how to trigger at startup using launchd. The code you provided looks like what I ended up with using Lingon (I know, I had to dust it off - still works with Snow Leopard).
You're right, this should have gone to launchd-dev list, sorry...I'll move this thread there. :)
Thanks, Don |