mirror of
https://github.com/munki/munki.git
synced 2026-02-21 22:50:31 -06:00
Reduce the likihood of a lingering /var/run/com.googlecode.munki.ManagedSoftwareUpdate by sleeping for 1/2 a second (instead of .1) and using open() instead of subprocess+touch to write the file.
This commit is contained in:
@@ -354,9 +354,9 @@ def notifyUserOfUpdates(force=False):
|
||||
# notify user of available updates using LaunchAgent to start
|
||||
# Managed Software Update.app in the user context.
|
||||
launchfile = '/var/run/com.googlecode.munki.ManagedSoftwareUpdate'
|
||||
cmd = ['/usr/bin/touch', launchfile]
|
||||
unused_retcode = subprocess.call(cmd)
|
||||
time.sleep(1)
|
||||
f = open(launchfile, 'w')
|
||||
f.close()
|
||||
time.sleep(0.5)
|
||||
if os.path.exists(launchfile):
|
||||
os.unlink(launchfile)
|
||||
user_was_notified = True
|
||||
|
||||
Reference in New Issue
Block a user