This has been happening off and on and I'm not entirely sure why... a perfectly good script, meaning it will run locally from the command line, will not run as a policy. This is a script that worked fine prior to 9.8 upgrade (we are running 9.8.1). Note, the script continues no reference to the jamf binary.
The error I get is:
Running script RebootNotification_v1.0.sh...
Script exit code: 127
Script result: /bin/sh: /Library/Application Support/JAMF/tmp/RebootNotification_v1.0.sh: No such file or directory
Running it via Casper Remote gives me:
Sending Wake On LAN command...
Opening SSH Connection to xx.xx.xx.xx..
Authenticating...
Successfully authenticated.
Verifying Computer's Identity...
The MAC Address has been verified.
Checking Operating System Version...
Running Mac OS X 10.10.5 (14F27)
Verifying /usr/local/jamf/bin/jamf...
/usr/local/jamf/bin/jamf is current (9.81)
Verifying /usr/sbin/jamf...
/usr/sbin/jamf does not exist.
Verifying /Library/Preferences/com.jamfsoftware.jamf.plist...
Preparing Policy...
Executing Policy 2015-10-09 at 1:18 PM | yellow | 1 Computer...
Mounting Casper to /Volumes/CasperShare...
Running script RebootNotification_v1.0.sh...
Script exit code: 127
Script result: /bin/sh: /Library/Application Support/JAMF/tmp/RebootNotification_v1.0.sh: No such file or directory
Submitting log to https://casper.domain.com:8443/
Finished.
Set up as a ongoing policy.
Running it as a policy fails.
Running it from command line as a -trigger worked ONCE. After that, always fails.
Run as a trigger:
ThisMac:Source yellow$ sudo jamf policy -trigger "runRebootNotification"
Password:
Checking for policies triggered by "runRebootNotification"...
Executing Policy [BETA] Reboot Notification [BETA]...
Mounting Casper to /Volumes/CasperShare...
Running script RebootNotification_v1.0.sh...
Script exit code: 127
Script result: /bin/sh: /Library/Application Support/JAMF/tmp/RebootNotification_v1.0.sh: No such file or directory
And I do have a tmp folder in my JAMF Application Support folder.
I'm seeing this more and more and it's becoming a problem.
Anyone else seeing this?
(I'd pay no attention to the obvious bug in Casper Remote, in checking for a binary that is no longer there).