super icon indicating copy to clipboard operation
super copied to clipboard

FR: Detect if Erase-Install is running a OS major Upgrade and quit super

Open master-vodawagner opened this issue 2 years ago • 0 comments

This is a niche area but currently we use Erase-Install to handle OS major upgrades rather than Super, we've come across a niche area whereby Erase-Install is running the upgrade to Sonoma (as an example), Apple then release a minor update so Super kicks in.

Super finds the Install macOS Sonoma.app file and deletes it which then causes Erase-Install to hang in fullscreen mode. I solved this in our fork'd copy of Super V3 with the below code but wondered if something could be added to Super V4 possibly?

# Checking if Erase-Install is running an macOS upgrade
ps -eaf | grep osinstallersetupd | grep -v grep
eraseInstallStatus=$(echo $?)

if [[ "$eraseInstallStatus" == 0 ]]; then
	sendToLog "Startup: Graham Pugh's Erase-Install programme appears to be running an upgrade of macOS."
	sendToLog "Startup: To avoid conflicting results of updates/upgrades Super will quit and try again later."
	sendToLog "**** S.U.P.E.R.M.A.N. $superVERSION EXIT ****"
	exit 0

master-vodawagner avatar Oct 31 '23 12:10 master-vodawagner