JSS 9.2: Script (after) doesn't run in policy with cached package

hansjoerg_watzl
Contributor II

Hi
After upgrading our JSS from version 8.7 to version 9.2 we can't create working policies with a "after"-script AND a package.
- Policies with just a package (pkg or DMG) and WITHOUT a script works fine.
- Policies with a "after" or "before" script and WITHOUT a package works fine.
- Policies with a "before" script and a package works fine.
- BUT policies with a "after" script AND a package doesn't work. The script will not be started, because the policy uses the package name as script name.

We created a test policy from scratch, assigned a dummy package and a dummy script. When running this policy, the log shows the following entry:

Running script 000_Mac_C_DMG_LyncWinEmoticons_1.0.dmg...
Script exit code: 126
Script result: /Library/Application Support/JAMF/tmp/000_Mac_C_DMG_LyncWinEmoticons_1.0.dmg: /Library/Application Support/JAMF/tmp/000_Mac_C_DMG_LyncWinEmoticons_1.0.dmg: cannot execute binary file

So it's clear the policy wants to run the script, but uses the wrong name (it's the name from the assigned package).

(We tried other DMG/PKG and scripts too…same error)

We need this combination to install a cached DMG with a "after"-script.

Thanks for any hints...

3 REPLIES 3

daniel_behan
Contributor III

I'm having the same issue. Many of my policies cache a package and then run Cocoa dialog prompting the end user to install and installAllCached is the custom trigger when they click OK.

daniel_behan
Contributor III

I spoke with my account rep and it looks like this is the answer: https://jamfnation.jamfsoftware.com/article.html?id=327

hansjoerg_watzl
Contributor II

Thanks for your info.
It's true, we didn't migrate the scripts/packages after updating to version 9, because we worry about other issues with such a migration.
We never read a note, that this Migrate function is essential to use policies with scripts as before. If so, this function should be mandantory by JAMF.
So this means: without migrating, JSS is buggy?