mpanighetti / install-or-defer

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

10.14.4 #10

Closed AppleKRIProjects closed 5 years ago

AppleKRIProjects commented 5 years ago

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)

christopherdietrich commented 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.

AppleKRIProjects commented 5 years ago

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

mpanighetti commented 5 years ago

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.

homebysix commented 5 years ago

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.

mpanighetti commented 5 years ago

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?

christopherdietrich commented 5 years ago

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.

homebysix commented 5 years ago

Is the fix as simple as adding --restart here, do you think?

mpanighetti commented 5 years ago

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.

AppleKRIProjects commented 5 years ago

If any testing it needed let me know, as I have bunch of machines to test with

mpanighetti commented 5 years ago

Give my branch/PR a try! #12

mpanighetti commented 5 years ago

@dvbguy Have you had a chance to test the updated build in #12?

mpanighetti commented 5 years ago

Changes from #12 are now live in master! Let us know if you're still seeing the failed update behavior.

AppleKRIProjects commented 5 years ago

I testet and and it seems to work both on new T2 macs and old macs