I'm deploying a dmg with a script to install it (Chemdraw). To mount the dmg manually, it needs the enter key to be hit many times and then "yes" followed by another enter to accept the license agreement. In my terminal,
hdiutil attach cd201.dmg >/dev/null < <(echo y) >/dev/null < <(echo y)
works perfectly to attach it silently. But when I put it in a jamf policy, it fails with this error:
| Running script Install and Activate Chemdraw... |
| Script exit code: 2 |
| Script result: /Library/Application Support/JAMF/tmp/Install and Activate Chemdraw: line 2: syntax error near unexpected token `<' /Library/Application Support/JAMF/tmp/Install and Activate Chemdraw: line 2: `hdiutil attach cd201.dmg >/dev/null < <(echo y) >/dev/null < <(echo y)' |
| Error running script: return code was 2. |
Why does it run on my terminal but fail in Jamf? How can I fix this?
