Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

greg.schumacher

macrumors newbie
Original poster
Oct 26, 2010
1
0
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
 

Attachments

  • install.log.txt
    8.1 KB · Views: 199

chown33

Moderator
Staff member
Aug 9, 2009
10,733
8,408
A sea of green
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:
Code:
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.