Posted on 04-05-2022 05:34 AM
To give everyone some background I'm trying to make the macOS update process run more smoothly. I stumbled upon erase-install on github and honestly it seems to be the answer that I'm looking for with one caveat. Our jamf connect has a custom branding load page and every time I run the upgrade function with erase-install it breaks that branding page for some reason. So I devised a plan to create a second policy that simply reinstalls the branding page with a custom trigger but it doesn't work. After looking into why this is happening it seems like I'm running into an error. (I might be completely wrong about this, this is just what I think personally).
Policy 1 which is installing/running erase-install triggers a custom event in Files and Processes called ReinstallBranding (I'm assuming this is triggered after the OS has completed being installed by the way)
Policy 2 which reinstalls the branding is set to run one the event is triggered under Options-General for the policy. (By the way this package requires a reboot).
SO What I think is happening is the reboot required by policy 2 is causing policy number 1 to never complete or at least that is what I'm reading online on different forums.
Is there a way to fix this or am I just stuck in the mud and need to figure something else out?
Posted on 04-05-2022 07:36 AM
Policies that run erase-install inherently fail before completion because the script reboots the system to run the macOS installer. Thus your files and processes payload will never get run. You should design a separate healing process for your branding files. You could leverage a startup policy, extension attribute + policy, or install a LaunchDaemon with your erase-install policy that fixes things on boot. Lots of options.