PDA

View Full Version : PackageMaker - postinstall script is not running




greg.schumacher
Oct 26, 2010, 06:15 PM
Using PackageMaker v3.0.1 with Mac OS X v10.5.8, I am trying to create an installer package that copies two file to a new folder and then runs a shell script. The folder is created, the files copied, but the postinstall script does not run. How do I know you ask. I replaced the contents of the postinstall script with the lines below and the text file was not created. Looking in the installer's log I find nothing to indicate an error or even an attempt to execute the postinstall script.

#!/bin/bash
echo "we were here" >> /test.txt
exit 0

The script's execute bit is set and I believe the permissions are set correctly. If I browse through the contents of the .mpkg package I find, buried deep within, the postinstall script. BTW, if I CD to the folder in which I find the script and type ./postinstall the text file is created successfully.

I have run out of things to try and appreciate any assistance you can provide. I've attached to this post the installer's log file for those interested.

Greg
Computer Guy



chown33
Oct 26, 2010, 08:12 PM
echo "we were here" >> /test.txt

Without permission to write to the root dir, that command will silently fail without creating a file.

Try something that doesn't require file-system permissions, like:
say "Go away before I taunt you some more."


The script's execute bit is set and I believe the permissions are set correctly.

Exactly what are the permissions?