Setup-Manager
Setup-Manager copied to clipboard
Feature request - Detect/report errors for shell commands
It would be great if JSM could identify when a script that has been run via the "shell" enrollment actions. In the most simple form this could just be putting a red X rather than the green tick on any items which exit with a non-zero exit code.
For devices that are being provisioned by end users they would hopefully see the red X and reach out to support to check the full logs. Those being provisioned by IT staff could investigate the logs themselves and it may be a simple case of going into recovery and removing /Volumes/Macintosh\ HD/private/var/db/.JamfSetupEnrollmentDone
to let JSM run again or just wiping and re-provisioning the device.
If it helps for testing a simple enrolment item that produces an error could be achieved with the XML below:
<key>enrollmentActions</key>
<array>
<dict>
<key>shell</key>
<string>/bin/bash</string>
<key>arguments</key>
<array>
<string>-c</string>
<string>exit 1</string>
</array>
<key>label</key>
<string>Testing Error</string>
<key>requiresRoot</key>
<false/>
</dict>
</array>