PackageMaker - postinstall script is not running

Discussion in 'Mac Programming' started by greg.schumacher, Oct 26, 2010.

  1. macrumors newbie

    Oct 26, 2010
    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.

    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.

    Computer Guy

    Attached Files:

  2. macrumors 604

    Aug 9, 2009
    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."
    Exactly what are the permissions?

Share This Page