Posted on 10-16-2013 12:52 PM
It seems that any policy I have that installs a package and then runs a script afterward does not work on the client machines. The package will install, but when the jamf binary attempts to download the script, it actually downloads the package installed earlier and then attempts to run it as a script.
Executing Policy Install VPN (Native OS X Cisco IPSec) as network service...
Downloading http://jss01.company.com/CasperShare/Packages/VPN.networkConnect.dmg...
Verifying DMG...
Installing VPN.networkConnect.dmg...
Closing package...
Creating directory structure for /Library/Application Support/JAMF/Downloads/
Downloading http://jss01.company.com/CasperShare/Packages/VPN.networkConnect.dmg...
Running script VPN.networkConnect.dmg...
Script exit code: 126
Script result: /Library/Application Support/JAMF/tmp/VPN.networkConnect.dmg: /Library/Application Support/JAMF/tmp/VPN.networkConnect.dmg: cannot execute binary file
The bolded section above shows it is downloading the package again, instead of running the setupVPN.sh script that is included in the policy and set to run after.
This seems like a pretty obvious bug to me.
For now as a workaround I've split the policy into 2 parts and have an extension attribute that checks if the package is installed and the script policy is scoped to only run on machines that have the package installed - but that's a messy hack, and I'd rather just have things work properly.
A similar problem was reported here: https://jamfnation.jamfsoftware.com/discussion.html?id=8172 But the solution there was to perform a migrate, and I'm not currently able to do that because of how our Imaging process works, not to mention I don't have the time to wait for a migrate to complete and then deal with any changes it may introduce.
Any insight welcome.
Posted on 10-16-2013 03:36 PM
I had the same issue when I upgraded from Casper 8 to 9. What I had to do to was to open the original package with composer, convert to source, add the script as a postflight instead of running a separate script afterwards. Not sure where the bug is since it just happened with a specific package but this is a patch solution in case you need it urgently.