mirror of
https://github.com/munki/munki.git
synced 2026-04-21 20:18:20 -05:00
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:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user