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:
Greg Neagle
2010-04-27 18:25:13 +00:00
parent 84bd6e2b7f
commit f988882003
+7 -1
View File
@@ -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)