Closed Theile closed 4 months ago
Hi Theile If you're using Jamf policy parameters, you need a equals sign for any values, so this is bad syntax:
--power-wait-limit 3600
It needs to be:
--power-wait-limit=3600
That could break the reading of the other parameters, so could you correct that and try again.
Oh, thanks. Will test tomorrow!
It worked. I was honestly puzzled from the wiki if I should use the equal sign or not.
This wiki page: https://github.com/grahampugh/erase-install/wiki/4.-Upgrading-or-reinstalling-macOS-without-wiping-the-system Uses both semantics in this paragraph: https://github.com/grahampugh/erase-install/wiki/4.-Upgrading-or-reinstalling-macOS-without-wiping-the-system#--min-drive-space-nn
How can I prevent mist from being downloaded? We do not have that tool approved, so have to avoid it. Do I need to use --ffi
rather than --pkg
?
You, seems to be my answer ;-)
https://github.com/grahampugh/erase-install/wiki/6.-Use-in-Jamf-Pro explains how to use it in Jamf.
Yes you would have to use --ffi if you want to avoid using Mist.
Describe the bug and To Reproduce I have imported the script to Jamf Pro, and made a policy with various parameters in the call: --reinstall --max-password-attempts=infinite --fs --cleanup-after-use --check-power --power-wait-limit 3600
And also this parameter in another test: --pkg
First this error happened: /Library/Application Support/JAMF/tmp/erase-install.sh:2713: bad math expression: operator expected at `infinite'
So I added an echo command above line 2713 so that it would echo the value so I could see it, but then it worked:
echo "new_max_password_attempts: $new_max_password_attempts"
Then I got this error: check_power_status:36: bad math expression: operator expected at `1800'
I remember seeing before that numbers was seen as text, so I added these two lines above the failing line:
((power_wait_timer++))
((power_wait_timer--))
Expected behavior I have followed the description here: https://github.com/grahampugh/erase-install/wiki/6.-Use-in-Jamf-Pro#option-2-upload-erase-installsh-into-jamf-pro-and-use-policy-script-parameters
Code/log output I don't want to ignore anything and have supplied all arguments used in the call above. So I think the above lines and my workarounds should be enough, as the failing was in handling of variables in the script.
Environment (please complete the following information):