diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-10-07 11:29:28 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-10-07 11:29:28 -0300 |
commit | 37e783274b55ecf0c57b517f574f6cab5167427e (patch) | |
tree | 9829c45d21bed331e44c49d541edd05d5c5932c1 | |
parent | 584866689560bd2ebea01ecc5e6ae5e79ce7fc81 (diff) |
Add support for running lxde polkit agent.
-rw-r--r-- | changes/feature-4028_support-lxpolkit | 1 | ||||
-rw-r--r-- | src/leap/bitmask/services/eip/linuxvpnlauncher.py | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/changes/feature-4028_support-lxpolkit b/changes/feature-4028_support-lxpolkit new file mode 100644 index 00000000..95aa5220 --- /dev/null +++ b/changes/feature-4028_support-lxpolkit @@ -0,0 +1 @@ + o Add support for running lxde polkit agent. Closes #4028. 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) |