mirror of
https://github.com/munki/munki.git
synced 2026-04-23 04:59:17 -05:00
managedsoftwareupdate: when notifying the user of available updates, we now kill any instances of Managed Software Update.app if it's already open; then we launch Managed Software Update.app in the current console user's session. This prevents stale data from being presented to one or more users, and provides a cleaner signalling mechanism for Managed Software Update.app; it now displays updates only if any exist at launch. We no longer have to figure out when to try to display available updates later.
git-svn-id: http://munki.googlecode.com/svn/trunk@529 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -212,8 +212,14 @@ def notifyUserOfUpdates(manualcheck=False):
|
||||
'/Library/Preferences/ManagedInstalls',
|
||||
'LastNotifiedDate', '-date', str(now)]
|
||||
retcode = subprocess.call(cmd)
|
||||
|
||||
# Kill Managed Software Update.app if it's already
|
||||
# open so it will update its display
|
||||
cmd = ["/usr/bin/killall", "Managed Software Update"]
|
||||
retcode = subprocess.call(cmd)
|
||||
|
||||
# notify user of available updates using LaunchAgent to start
|
||||
# Managed Software Update.app in the user context
|
||||
# Managed Software Update.app in the user context.
|
||||
launchfile = "/var/run/com.googlecode.munki.ManagedSoftwareUpdate"
|
||||
cmd = ['/usr/bin/touch', launchfile]
|
||||
retcode = subprocess.call(cmd)
|
||||
|
||||
Reference in New Issue
Block a user