Postflight install script issue
Problem: two different postflight script results between 10.5 and 10.6 IDMG installs. I think it might be the lack of the chroot jail on 10.6 not keeping the shell pointing into the sandbox, but here's the problem/question anyway.
I have a launch daemon (plist file) installing into /Library/LaunchDaemons, and the script that it calls into /Library/Scripts. I was initially trying to make the daemon script file invisible (for various reasons), first by dotting the file (i.e. loading /.script.sh doesn't work in PackageMaker), then by using SetFile from the Xcode developer's tools to set the invisible bit [i]before [/i]packaging (didn't work), then packaging SetFile with postflight script to execute after installation.
So: made a package with PM (whatever version Xcode tools for 10.5 comes with), including all three items. Added a postflight shell script (in SetFile's scripts tab) that simply calls SetFile to set the invisibility bit on the daemon script, then deletes the SetFile executable.
Postflight script:[code]#!/bin/sh
/private/tmp/SetFile -a V /Library/Scripts/script.sh
rm /private/tmp/SetFile
[/code]This works using the following:
Host OS: 10.5
Install image: 10.5
BaseUpdates: 10.5.8 combo update
IDMG: 1.6b1svn246 (also works w/1.5rc1)
However, when I duplicate the above process under everything for 10.6 (host OS, install OS, PM for 10.6, IDMG 1.6b1), the installer places all three items properly into the image but fails on the postflight script, claiming the "no such file or directory" rant. (Not currently at my build computers, so I can't paste the logfile - sorry). I tried using the package made under 10.5, but had the same result. I tried installing SetFile into /private/tmp, /private/var, /Library/Scripts, to no avail.
I don't [i]have [/i]to have an invisible daemon script, but this brings up lot of other similar post-install script operations I will want to do in the future. I'm planning on supporting Snow Leopard only if possible (this is for Intel Macs only - 10.5 not necessary). I can't exactly customize the OS with script operations if they'd all fail like this, so am I missing something obvious here? Anything else I can try?
BTW, huge thanks for this project! I wouldn't even be attempting what I'm trying if not for IDMG.
Doug