mpanighetti / install-or-defer

A framework for prompting users of Jamf Pro-managed Macs to install Apple software updates.
Apache License 2.0
147 stars 28 forks source link

Additional updates are prompted after updating the OS #66

Closed vinulogy closed 2 years ago

vinulogy commented 2 years ago

I'm not sure if this is an expected behaviour, but here goes. After users update their OS, they receive another prompt to install the "Device Support" update. (This was on Catalina 10.15.7)

Some users feel they're stuck in an update loop. Is it possible to combine the Device Support with the OS update?

Screen Shot 2021-11-01 at 10 48 16 AM
mpanighetti commented 2 years ago

Unfortunately, if an update requires running a previous update, then you'll potentially get another alert after running the first update, and they cannot be combined since the secondary update isn't advertised to the system when it runs softwareupdate --list initially. The same thing would happen if they manually ran updates in System Preferences > Software Update; they'd get a security update, run it, restart, then get another prompt to install the secondary update. This behavior is called out as a limitation on the README.

If multiple updates are available when softwareupdate --list is run and finds a restart-required update, the script will run all available updates, so as far as I know it's already doing about all it can do to minimize this behavior. If Apple keeps making Device Support Updates require having already run security updates and restarted, this behavior will likely persist in the future.

Hope that all helps! Let me know if you have any other questions about how the script functions on the backend, always happy to look for opportunities to improve. I already see from your screenshot that we could use some logic around updates with no version number included. :D