diff options
author | Kali Kaneko <kali@leap.se> | 2013-03-27 03:56:57 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-04-03 01:02:13 +0900 |
commit | 2c3593b803d88b67e8d98f6227a687a6737916ec (patch) | |
tree | de1c883acddab8faf38d70c55e41b5e70714c1ab /src/leap/services | |
parent | d8ed08649d8337c1b5de8ae1e87a71435f3505f0 (diff) |
fix osx prefixer and launcher
Diffstat (limited to 'src/leap/services')
-rw-r--r-- | src/leap/services/eip/vpnlaunchers.py | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index 57a8092e..37c6256e 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -320,7 +320,15 @@ class DarwinVPNLauncher(VPNLauncher): leap_assert(socket_host, "We need a socket host!") leap_assert(socket_port, "We need a socket port!") - openvpn_possibilities = which(self.OPENVPN_BIN) + kwargs = {} + if ProviderConfig.standalone: + kwargs['path_extension'] = os.path.join( + providerconfig.get_path_prefix(), + "..", "apps", "eip") + + openvpn_possibilities = which( + self.OPENVPN_BIN, + **kwargs) if len(openvpn_possibilities) == 0: raise OpenVPNNotFoundException() @@ -391,6 +399,21 @@ class DarwinVPNLauncher(VPNLauncher): return [command] + cmd_args + def get_vpn_env(self, providerconfig): + """ + Returns a dictionary with the custom env for the platform. + This is mainly used for setting LD_LIBRARY_PATH to the correct + path when distributing a standalone client + + @param providerconfig: provider specific configuration + @type providerconfig: ProviderConfig + + @rtype: dict + """ + return {"LD_LIBRARY_PATH": os.path.join( + providerconfig.get_path_prefix(), + "..", "lib")} + class WindowsVPNLauncher(VPNLauncher): """ |