summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-05-22 11:37:35 -0300
committerTomás Touceda <chiiph@leap.se>2013-05-22 11:37:35 -0300
commitfd4e5894201bff63253e969765908edb997c249a (patch)
tree2cd9f3db3e0705dc6b9d2d501783ea2ad6978801 /src/leap
parentabae9151636e285f90347f7dae1f079095ddc80f (diff)
parent372a9aad068e16c0ed957fac5c081ce409dbf7e7 (diff)
Merge remote-tracking branch 'ivan/bug/kde-polkit-support' into develop
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/services/eip/vpnlaunchers.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py
index 540bc45e..addad959 100644
--- a/src/leap/services/eip/vpnlaunchers.py
+++ b/src/leap/services/eip/vpnlaunchers.py
@@ -124,9 +124,16 @@ def _has_updown_scripts(path):
def _is_auth_agent_running():
- return len(
- commands.getoutput(
- 'ps aux | grep polkit-[g]nome-authentication-agent-1')) > 0
+ """
+ Checks if a polkit daemon is running.
+
+ :return: True if it's running, False if it's not.
+ :rtype: boolean
+ """
+ polkit_gnome = 'ps aux | grep polkit-[g]nome-authentication-agent-1'
+ polkit_kde = 'ps aux | grep polkit-[k]de-authentication-agent-1'
+ return (len(commands.getoutput(polkit_gnome) > 0) or
+ len(commands.getoutput(polkit_kde)) > 0)
class LinuxVPNLauncher(VPNLauncher):