Logic changes to get proper logoutinstall behavior when there is an available Apple Update but no munki update.

git-svn-id: http://munki.googlecode.com/svn/trunk@322 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-11-12 00:09:26 +00:00
parent 9ff9879959
commit f80eff278b
2 changed files with 11 additions and 3 deletions
+5 -1
View File
@@ -334,9 +334,13 @@ def main():
munkistatus.message("Checking for available Apple Software Updates...")
munkistatus.detail("")
munkistatus.percent(-1)
if appleupdates.appleSoftwareUpdatesAvailable(options.manualcheck):
if appleupdates.appleSoftwareUpdatesAvailable(forcecheck=options.manualcheck):
updatesavailable = True
if options.installonly and munkicommon.pref('InstallAppleSoftwareUpdates'):
if appleupdates.appleSoftwareUpdatesAvailable(suppresscheck=True):
updatesavailable = True
if options.manualcheck:
# don't need MunkiStatus any more...
munkistatus.quit()
+6 -2
View File
@@ -374,7 +374,7 @@ def writeAppleUpdatesFile():
return False
def appleSoftwareUpdatesAvailable(checking_manually):
def appleSoftwareUpdatesAvailable(forcecheck=False, suppresscheck=False):
'''Checks for available Apple Software Updates, trying not to hit the SUS
more than needed'''
# have we already processed the list of Apple Updates?
@@ -384,8 +384,12 @@ def appleSoftwareUpdatesAvailable(checking_manually):
updatesindexfile_modtime = os.stat(updatesindexfile).st_mtime
if appleUpdatesFile_modtime > updatesindexfile_modtime:
return True
else:
# updatesindexfile is newer, use it to generate a new
# appleUpdatesFile
return writeAppleUpdatesFile()
if checking_manually:
if forcecheck:
retcode = checkForSoftwareUpdates()
else:
# have we checked recently? Don't want to check with