mirror of
https://github.com/munki/munki.git
synced 2026-04-22 04:28:21 -05:00
If there are GUI users and we have forced_* items, recheck munkiUpdatesAvailable() before trying to notifiy the user so we don't notify if we have nothing left to do.
git-svn-id: http://munki.googlecode.com/svn/trunk@818 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -618,17 +618,20 @@ def main():
|
||||
'SuppressAutoInstall is true.')
|
||||
else: # there are GUI users
|
||||
doInstallTasks(only_forced=True)
|
||||
consoleuser = munkicommon.getconsoleuser()
|
||||
if consoleuser == u'loginwindow':
|
||||
# someone is logged in, but we're sitting at
|
||||
# the loginwindow due to fast user switching
|
||||
# so do nothing
|
||||
pass
|
||||
elif not munkicommon.pref('SuppressUserNotification'):
|
||||
notifyUserOfUpdates()
|
||||
else:
|
||||
munkicommon.log('Skipping user notification because '
|
||||
'SuppressUserNotification is true.')
|
||||
# it's possible that we no longer have any available updates
|
||||
# so we need to check InstallInfo.plist again
|
||||
if munkiUpdatesAvailable():
|
||||
consoleuser = munkicommon.getconsoleuser()
|
||||
if consoleuser == u'loginwindow':
|
||||
# someone is logged in, but we're sitting at
|
||||
# the loginwindow due to fast user switching
|
||||
# so do nothing
|
||||
pass
|
||||
elif not munkicommon.pref('SuppressUserNotification'):
|
||||
notifyUserOfUpdates()
|
||||
else:
|
||||
munkicommon.log('Skipping user notification because '
|
||||
'SuppressUserNotification is true.')
|
||||
|
||||
elif not options.quiet:
|
||||
print ('\nRun %s --installonly to install the downloaded '
|
||||
|
||||
Reference in New Issue
Block a user