Launch via Jamf (or other MDM) policy #448
Replies: 1 comment 1 reply
-
It's been months and you probably won't answer but I find sporadically an error where the script fails to overwrite older installers present in /Library/Management/erase-install 2024-02-09 20:14:22 | v32.0 | [find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_12.3.1-21E258.sparseimage. 2024-02-09 20:14:26 | v32.0 | [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success I find the cause is that there is a sparse image of an older OS in that folder but it's supposed to overwrite it. In this case, it seems to attempt to mount it and fails. |
Beta Was this translation helpful? Give feedback.
-
I created this script to consolidate a few things. First, it calls the custom trigger of the standalone erase-install policy in Jamf so the latest version in your environment is always installed at run time. Then, if it on Big Sur, it will call the custom trigger for SwiftDialog 2.2.1 since newer versions aren't compatible.
It then checks that both erase-install.sh and SwiftDialog are found and reports their versions for logging purposes. It then does some checking around the macOS version that was passed; if it's blank it uses the current version, if it was asking for an older version, it will quit, you can pass sameos as well.
I then threw in a function that outputs the exact command that is going to be run to a file with the date & time stamp in /var/log/erase-install/ (this folder is created if needed). This can be useful if you want to recreate any failures on the machine. The main log file is /var/log/EraseInstallPolicy.log.
Finally, it runs the erase-install script with the flags that work for us and the reinstall/erase flags and macOS versions that were passed in the policy.
Feel free to try it out and modify to fit your needs!
https://github.com/PhillyPhoto/erase-install-policy
Beta Was this translation helpful? Give feedback.
All reactions