mirror of
https://github.com/munki/munki.git
synced 2026-01-09 08:00:44 -06:00
managedsoftwareupdate now records the date and result of the last check in /Library/Preferences/ManagedInstalls.plist. This is used by Managed Software Update.app.
git-svn-id: http://munki.googlecode.com/svn/trunk@237 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -168,6 +168,16 @@ def main():
|
||||
updatesavailable = False
|
||||
if not options.installonly:
|
||||
result = updatecheck.check(id=options.id)
|
||||
|
||||
# record last check date and result
|
||||
nowString = munkicommon.NSDateNowString()
|
||||
cmd = ['/usr/bin/defaults', 'write', '/Library/Preferences/ManagedInstalls',
|
||||
'LastCheckDate', '-date', nowString]
|
||||
retcode = subprocess.call(cmd)
|
||||
cmd = ['/usr/bin/defaults', 'write', '/Library/Preferences/ManagedInstalls',
|
||||
'LastCheckResult', '-int', str(result)]
|
||||
retcode = subprocess.call(cmd)
|
||||
|
||||
if options.manualcheck:
|
||||
munkistatus.quit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user