Closed AppleKRIProjects closed 5 years ago
I guess this is because BridgeOS updates require a shutdown instead of a reboot to be installed successfully. You'd have to parse the output of softwareupdate like Munki is doing and decide whether to shut down or restart.
Ok, so seems to be possible. However, I am not at all any script expert, so hoping there will be made a modification for this great update script
Can one of you run softwareupdate --list
on a T2 Mac that hasn't yet run the 10.14.4 update and send the output? Would be helpful to know how a shutdown-required update summary is formatted so it can be accounted for in the script logic.
Here's what I get when I also include config data:
$ softwareupdate --list --include-config-data
Software Update Tool
Finding available software
Software Update found the following new or updated software:
* GatekeeperConfigData-164
Gatekeeper Configuration Data (164), 3459K [recommended]
* macOS 10.14.4 Update-
macOS 10.14.4 Update ( ), 2762234K [recommended] [restart]
* TCCConfigData-16.0
TCC Configuration Data (16.0), 11K [recommended]
The TCC and Gatekeeper items should be unrelated. But there's definitely no separate BridgeOS update listed, even though it does have a distinct item in the SUCatalog.
Hrm, and it doesn’t appear to call out a shutdown requirement. Was hoping there would be some different text to parse, but without an indication that a shutdown is required, I’m not sure how the script could be updated. Maybe just assume shutdown for updates on T2 Macs with the [restart]
tag? Is a shutdown always required in this scenario?
It‘ll output
Installation will not complete successfully if you choose to restart your computer instead of shutting down.
Please call halt(8) or select Shut Down from the Apple menu. To automate the shutdown process with softwareupdate(8), use --restart.
but only when installing a BridgeOS update, not when listing available updates.
That would satisfy the command requirement, but I suspect it would kill the script and prevent the cleanup steps from running afterward. It seems like we can run softwareupdate --install --all
, parse that output to look for the note @christopherdietrich mentioned, and change the restart logic to shutdown logic when that string is found.
If any testing it needed let me know, as I have bunch of machines to test with
Give my branch/PR a try! #12
@dvbguy Have you had a chance to test the updated build in #12?
Changes from #12 are now live in master! Let us know if you're still seeing the failed update behavior.
I testet and and it seems to work both on new T2 macs and old macs
Seems the script has some issue with the new 10.14.4 update. When launching for restart of the update you have to pick startup disk etc which fail (at least on new t2 mac)