mirror of
https://github.com/munki/munki.git
synced 2026-04-24 05:49:42 -05:00
Added function to clear Apple Update info.
git-svn-id: http://munki.googlecode.com/svn/trunk@374 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -479,6 +479,17 @@ def OLDinstallAppleUpdates():
|
||||
return False
|
||||
|
||||
|
||||
def clearAppleUpdateInfo():
|
||||
'''Clears Apple update info. Called after performing munki updates
|
||||
because the Apple updates may no longer be relevant.'''
|
||||
updatesindexfile = '/Library/Updates/index.plist'
|
||||
try:
|
||||
os.unlink(updatesindexfile)
|
||||
os.unlink(appleUpdatesFile)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
|
||||
|
||||
def installAppleUpdates():
|
||||
'''Uses /usr/sbin/installer to install updates previously
|
||||
downloaded. Some items downloaded by SoftwareUpdate are not
|
||||
@@ -527,7 +538,8 @@ def installAppleUpdates():
|
||||
|
||||
|
||||
# define this here so we can access it in multiple functions
|
||||
appleUpdatesFile = os.path.join(munkicommon.pref('ManagedInstallDir'),'AppleUpdates.plist')
|
||||
appleUpdatesFile = os.path.join(munkicommon.pref('ManagedInstallDir'),
|
||||
'AppleUpdates.plist')
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user