Re: PackageMaker woes (launchd and postinstall)
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com User-agent: Thunderbird 2.0.0.14 (X11/20080505) Hi there, Many thanks for the advice. I ended up trying symbolic links (apparently aliases are something quite different), which launchd refused to use due to permissions issues. So installing directly to the Launch* directories does in fact seem to be the correct way to do it. I'm still stuck on running a script after installation. I'm aware of postinstall, but where do I add it in the PackageMaker GUI? Add it as a "content", or specify it in postinstall actions somehow? The shell needs to execute things in a certain order. The only area I can see for specifying scripts is within individual packages, but I need a "global" postinstall after everything is installed. gah! Thanks again for any help. Cheers, Tim � wrote:
On Jul 14, 2008, at 12:06 PM, Tim Schooley wrote:
Hi folks!
So I'm trying to create a package for Leopard (not worried about backwards compatibility) that contains the following components:
---
1) A kernel extension 2) A launchd daemon 3) A launchd agent 4) An application
I have organised the package into 3 sub-packages:
- MyApp.kext - contains the kext only. - MyApp.framework - contains: - shared libraries - daemon - agent - launchd scripts - MyApp.app - contains: - application
---
In PackageMaker, I specify 3 post-install actions:
1) Load the kext 2) Add an alias of: /Library/LaunchDaemons/myappdaemon.plist -> /Library/Frameworks/myapp.framework/Versions/Current/myappdaemon.plist 3) Add an alias of: /Library/LaunchAgents/myappdaemon.plist -> /Library/Frameworks/myapp.framework/Versions/Current/myappagent.plist
---
So my problems so far are:
1) The aliases aren't created. 2) The installer insists that the user needs to log out and log in again. 3) I'd like to execute "launchctl load /path/to/launchd/scripts" afterwards, but am not quite sure how to go about it. The documentation for packagemaker is really sparse in this area.
Any ideas? I'm pulling my hear out over the launchd stuff - I searched this list for launchd stuff, which returned old or unrelated issues.
Would installing the launchd scripts to the /Library/Launch* paths directly be a better option? It doesn't seem as clean to me.
Many many thanks for any advice.
Regarding Problem #1:
I would strongly recommend not doing what you're doing as it's potentially a security flaw. Items inside /Library/Framework are root:daemon. Items inside /Library/Launch* are root:wheel. By creating an alias (do you mean symbolic link?) inside something that is root:wheel from something that is root:admin, you're moving to a root escalation security flaw.
Just install your launchd scripts where they are supposed to be in the first place.
_______________________________________________ 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... This email sent to site_archiver@lists.apple.com
participants (1)
-
Tim Schooley