mirror of
https://github.com/munki/munki.git
synced 2026-04-25 06:18:53 -05:00
Automatic Apple Updates
This adds support for automatic unattended installation of Apple updates. It is intended to cut down on the need for creating pkginfos just to add unattended_install keys. Setting `AutomaticAppleUpdates` to true will cause all Apple updates which do not require a logout or restart to be treated as unattended, getting the blocking applications list from the Apple distribution. It is currently limited to just Yosemite and newer, though it can likely be extended down to Mavericks. The behavior is similar to when "Install OS X updates" is set to true in the App Store's preferences.
This commit is contained in:
committed by
Samuel Keeley
parent
39cf5e8f52
commit
e9986c4439
@@ -1651,8 +1651,12 @@ class AppleUpdates(object):
|
||||
'Error reading: %s', self.apple_updates_plist)
|
||||
return item_list, product_ids
|
||||
apple_updates = pl_dict.get('AppleUpdates', [])
|
||||
os_version_tuple = munkicommon.getOsVersion(as_tuple=True)
|
||||
for item in apple_updates:
|
||||
if item.get('unattended_install'):
|
||||
if (item.get('unattended_install') or
|
||||
(munkicommon.pref('AutomaticAppleUpdates') and
|
||||
item.get('RestartAction', 'None') = 'None' and
|
||||
os_version_tuple >= (10, 10))):
|
||||
if munkicommon.blockingApplicationsRunning(item):
|
||||
munkicommon.display_detail(
|
||||
'Skipping unattended install of %s because '
|
||||
|
||||
@@ -1214,6 +1214,7 @@ def pref(pref_name):
|
||||
'SuppressStopButtonOnInstall': False,
|
||||
'PackageVerificationMode': 'hash',
|
||||
'FollowHTTPRedirects': 'none',
|
||||
'AutomaticAppleUpdates': False,
|
||||
}
|
||||
pref_value = CFPreferencesCopyAppValue(pref_name, BUNDLE_ID)
|
||||
if pref_value == None:
|
||||
|
||||
Reference in New Issue
Block a user