Releases: deviscoding/mac-update
Fixes "Shutdown" Update Detection
Fixes an issue with the detection of updates that require an update to BridgeOS that manifested with macOS Mojave Security Update 2021-005.
Battery Information
Adds additional battery information to the summary command, including the battery percentage and estimated time remaining.
SUS Server & Asset Cache Locator Features
This release adds functionality for custom SUS servers, as well as Content Caching:
- The availability of any set custom SUS server is checked in the
check,download,list, andinstallcommands. - The
summarycommand now contains information about any custom SUS server setting, as well as any Content Cache being used. - The
waitcommand now allows for waiting for a custom SUS server to be available using the--susflag.
Note that this does not add any custom SUS support to macOS versions that no longer support it.
Update Timeouts Fixed
In the previous update, the timeout for the softwareupdate process was inadvertently ignored. This has been fixed in this version.
Updates on Machines w/ T2 Security Chips
Fixes the following bugs:
- Updates that require a shutdown due to an update of BridgeOS on machines with the T2 security chip were being detected as 'restart' updates. These are now correctly detected as 'shutdown' updates.
- Using the 'wait' command, the correct return code was not returned when waiting for a user logout.
- Updates were not detected when using the
--no-scanflag.
Various other code improvements were also made.
FileVault Status Fix
On some machines, execution of 'fdesetup status' can hang, causing issues with execution of commands; this is fixed by allowing the command to time out if necessary.
Timeout Support
Adds a --timeout flag to most commands to control how long the softwareupdate process should be allowed to run. The default timeouts have been set logically, with the intent of allowing the process to complete, rather than killing it prematurely.
As a hanging update process can stall other dependent commands in a MDM environment, it is unwise to let a hanging softwareupdate process run indefinitely. However, it is also unwise to interrupt a software update in the middle. To avoid risk of leaving a system in an inconsistent state, it is recommended that the timeouts not be set lower than the defaults, which are listed below.
- check/list/summary: 7200 seconds (2 hours)
- download: 14400 seconds (4 hours)
- install: 21600 seconds (6 hours)
Free Disk Space + Bugfixes
This release fixes a bug that caused timeouts when installing some updates.
Additionally, the amount of free disk space (in GiB) was added to the 'summary' command.
High CPU Load
Improves the definition of "High CPU Load" so that it is more applicable to our usage.
Wait Command
This version adds a new command to be used in other scripting, which can wait for a given number of seconds, or until one or more conditions are cleared, allowing a system administrator to determine if it is "safe" to run updates on a Mac system.
The command can wait until the following conditions have cleared: high CPU load, user logged into GUI, FileVault encryption, system on battery power, and screen sleep disabled. See the README for more information.