ControlPlane: Shell script evidence stopped working with 1.6.3
As reported by another user on the google groups the shell script evidence source seems to be broken with the recent update. My script was working perfectly until recent 1.6.3 update and stopped returning a positive result when true:
#!/bin/sh
for ip in 192.168.0.{30..32}; do ping -t 1 $ip > /dev/null && echo "${ip} is up"; done
Thanks for your support!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (6 by maintainers)
Thanks for the hint. Just in case others are running into issues with applescripts used as evidence sources, I was able to workaround this with the following (assuming shouldExit indicates whether the output of the script should fail):
1.6.1 and earlier, I could exit an applescript and have it interpreted as success or failure like this:
With 1.6.2+, I can workaround with the following change:
Is this something that should be filed with Apple?
I’m seeing the same behavior (Shell script evidence sources work in 1.6.1, broken in 1.6.2, semi-functional in 1.6.4). In my case, the script in question that was working is run with the applescript interpreter:
#!/usr/bin/osascriptwith an error or return line, which then returns 1 or 0 to the shell as verified with echo $? after calling the script. 1.6.1: Works (returns correct value in evidence sources based on script logic) 1.6.2: Broken (always shows as false in evidence sources) 1.6.4: Broken (always shows as false in evidence sources)
To test, I then created two bash scripts that return 0 or 1:
#!/bin/bashexit 0#!/bin/bashexit 11.6.1: Works (first script returns true in evidence sources, second one is false) 1.6.2: Broken (both scripts always show false in evidence sources) 1.6.4: Works (first script returns true in evidence sources, second one is false)