Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 26, 2010, 06:15 PM   #1
greg.schumacher
macrumors newbie
 
Join Date: Oct 2010
PackageMaker - postinstall script is not running

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
Attached Files
File Type: txt install.log.txt (8.1 KB, 96 views)
greg.schumacher is offline   0 Reply With Quote
Old Oct 26, 2010, 08:12 PM   #2
chown33
macrumors 603
 
Join Date: Aug 2009
Quote:
Originally Posted by greg.schumacher View Post
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."
Quote:
The script's execute bit is set and I believe the permissions are set correctly.
Exactly what are the permissions?
chown33 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Automator script not running at every login? Risco OS X Mavericks (10.9) 0 Apr 21, 2014 02:03 PM
Adding Command (Script) to Packagemaker Installer? Goftrey Mac Programming 4 Aug 23, 2013 08:25 PM
Shell Script Running and Password Problems skinicod Mac Programming 3 Jul 7, 2013 06:25 PM
Need help running this .sh script? uly609 iMac 3 Feb 28, 2013 11:19 AM
Running a PHP Script Ides Web Design and Development 5 Sep 17, 2012 05:08 PM

Forum Jump

All times are GMT -5. The time now is 08:58 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC