take out another instance of 'launchctl bsexec' usage under 10.11

This commit is contained in:
Greg Neagle
2015-07-14 13:44:15 -07:00
parent 6f3b65feac
commit 441e649288

View File

@@ -790,10 +790,14 @@ def runAdobeCCPpkgScript(dmgpath, payloads=None, operation='install'):
os.symlink(os.path.join(realdir, item),
os.path.join(tmpsubdir, item))
if (not munkicommon.getconsoleuser() or
munkicommon.getconsoleuser() == u"loginwindow"):
os_version_tuple = munkicommon.getOsVersion(as_tuple=True)
if (os_version_tuple < (10, 11) and
(not munkicommon.getconsoleuser() or
munkicommon.getconsoleuser() == u"loginwindow")):
# we're at the loginwindow, so we need to run the deployment
# manager in the loginwindow context using launchctl bsexec
# launchctl bsexec doesn't work for this in El Cap, so do it
# only if we're running Yosemite or earlier
loginwindowPID = utils.getPIDforProcessName("loginwindow")
cmd = ['/bin/launchctl', 'bsexec', loginwindowPID]
else: