summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-10-07 15:00:12 -0300
committerTomás Touceda <chiiph@leap.se>2013-10-07 15:00:12 -0300
commit5548a0d9bcd2e49606a7c09f8ec1c3bc71287943 (patch)
tree34c1cd0691f0dbeae6a7d2a57d35c713eb4eecf1 /src
parentdff0713f8da773330448bc74b30c7323c8db1e79 (diff)
parent37e783274b55ecf0c57b517f574f6cab5167427e (diff)
Merge remote-tracking branch 'ivan/feature/4028_support-lxpolkit' into develop
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/services/eip/linuxvpnlauncher.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/bitmask/services/eip/linuxvpnlauncher.py b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
index c2c28627..efb23285 100644
--- a/src/leap/bitmask/services/eip/linuxvpnlauncher.py
+++ b/src/leap/bitmask/services/eip/linuxvpnlauncher.py
@@ -61,9 +61,13 @@ def _is_auth_agent_running():
:return: True if it's running, False if it's not.
:rtype: boolean
"""
- ps = 'ps aux | grep polkit-%s-authentication-agent-1'
- opts = (ps % case for case in ['[g]nome', '[k]de'])
- is_running = map(lambda l: commands.getoutput(l), opts)
+ # the [x] thing is to avoid grep match itself
+ polkit_options = [
+ 'ps aux | grep polkit-[g]nome-authentication-agent-1',
+ 'ps aux | grep polkit-[k]de-authentication-agent-1',
+ 'ps aux | grep [l]xpolkit'
+ ]
+ is_running = [commands.getoutput(cmd) for cmd in polkit_options]
return any(is_running)