diff options
| author | Tomás Touceda <chiiph@leap.se> | 2013-07-10 16:20:09 -0300 | 
|---|---|---|
| committer | Tomás Touceda <chiiph@leap.se> | 2013-07-10 16:20:09 -0300 | 
| commit | b138c5e11476e46f3b84cedf3601e302c5a27630 (patch) | |
| tree | 305a070dce297d6c23647555cd8208f7b53e10d1 | |
| parent | 6425331ad6cb74ac44ed95b98adf4eae0f6e6255 (diff) | |
Make the install_path relative to the launcher path instead of absolute
Also, add quotes to the up/down script lines in case the path has spaces
| -rw-r--r-- | changes/bug_osx_bundle | 2 | ||||
| -rw-r--r-- | src/leap/services/eip/vpnlaunchers.py | 9 | 
2 files changed, 7 insertions, 4 deletions
| diff --git a/changes/bug_osx_bundle b/changes/bug_osx_bundle new file mode 100644 index 00000000..d059468d --- /dev/null +++ b/changes/bug_osx_bundle @@ -0,0 +1,2 @@ +  o OSX: Make the install_path relative to the launcher path instead +    of absolute.
\ No newline at end of file diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index a1f7e4cf..116a8790 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -472,8 +472,8 @@ class DarwinVPNLauncher(VPNLauncher):      INSTALL_MSG = ("\"LEAP needs administrative privileges to install "                     "missing scripts and fix permissions.\"") -    INSTALL_PATH = "/Applications/LEAP Client.app" -    INSTALL_PATH_ESCAPED = "/Applications/LEAP\ Client.app"  +    INSTALL_PATH = os.path.realpath(os.getcwd() + "/../../") +    INSTALL_PATH_ESCAPED = os.path.realpath(os.getcwd() + "/../../")      OPENVPN_BIN = 'openvpn.leap'      OPENVPN_PATH = "%s/Contents/Resources/openvpn" % (INSTALL_PATH,)      OPENVPN_PATH_ESCAPED = "%s/Contents/Resources/openvpn" % ( @@ -620,12 +620,13 @@ class DarwinVPNLauncher(VPNLauncher):          if _has_updown_scripts(self.UP_SCRIPT):              args += [ -                '--up', self.UP_SCRIPT, +                '--up', '\"%s\"' % (self.UP_SCRIPT,),              ]          if _has_updown_scripts(self.DOWN_SCRIPT):              args += [ -                '--down', self.DOWN_SCRIPT] +                '--down', '\"%s\"' % (self.DOWN_SCRIPT,) +            ]              # should have the down script too              if _has_updown_scripts(self.OPENVPN_DOWN_PLUGIN): | 
