• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Packages preflight script failure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Packages preflight script failure


  • Subject: Re: Packages preflight script failure
  • From: Stephane Sudre <email@hidden>
  • Date: Sun, 14 Jun 2015 20:08:41 +0200

On Sat, Jun 13, 2015 at 10:54 PM, Antony Nispel <email@hidden> wrote:
> I have been unsuccessful in getting Packages V1.1.2 in either bundle or flat
> mode to fire any sort of script—even simple test script that simply beeps:
>
>
> #!/bin/sh
>      osa"beep 1"
> exit 0
>
>
> The package and script have been code-signed and verified, and the script
> permissions are set to what I take to be the correct permissions using chmod
> u+rwx.

Note that the source scripts just need to have the read permission.
The permissions of the post-installation and pre-installation scripts
within the package are automatically set during the build phase of the
package.

> What is frustrating is that I have an older Package installation file that executes its script. What can I be overlooking?

When the scripts are run during installation, there are corresponding
log entries in install.log (or in the Log Window of the Installer.app
application (Window > Installer Log).

In the case of your script, here is what I get on a 10.10.3 system:

Jun 14 20:01:27 MacPro.local installd[459]: PackageKit: Executing
script "./preinstall" in
/private/tmp/PKInstallSandbox.4Ed5nc/Scripts/com.mygreatcompany.pkg.TestScript.ijFITN
Jun 14 20:01:27 MacPro.local installd[459]: ./preinstall:
/tmp/PKInstallSandbox.4Ed5nc/Scripts/com.mygreatcompany.pkg.TestScript.ijFITN/preinstall:
line 3: osa: command not found

What you're looking for is probably:

--------8<--------8<--------8<--------8<--------

#!/bin/sh

/usr/bin/osascript -e "beep 1"

exit 0

--------8<--------8<--------8<--------8<--------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Packages preflight script failure (From: Antony Nispel <email@hidden>)

  • Prev by Date: Re: Packages preflight script failure
  • Next by Date: Installs on Closed Network/no internet access systems take long time to complete
  • Previous by thread: Re: Packages preflight script failure
  • Next by thread: Installs on Closed Network/no internet access systems take long time to complete
  • Index(es):
    • Date
    • Thread