diff options
author | Ivan Alejandro <ivanalejandro0@yahoo.com.ar> | 2013-07-17 16:09:51 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@yahoo.com.ar> | 2013-07-17 16:09:51 -0300 |
commit | 7ec29145b064afab312cb57e74dc33c38da1e3ea (patch) | |
tree | 689d3ae91b753114e4f2d6749894ab35313dfe2e /src/leap/services/eip | |
parent | d7fe2178aa67e7676414ed763ba9316f673eb03b (diff) | |
parent | 28d8e58607f97f5467e58ee21ef45ef396ba9598 (diff) |
Merge remote-tracking branch 'chiiph/feature/generate_policy' into develop
Diffstat (limited to 'src/leap/services/eip')
-rw-r--r-- | src/leap/services/eip/vpnlaunchers.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index fc77de48..550877cd 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -254,16 +254,24 @@ class LinuxVPNLauncher(VPNLauncher): OTHER_FILES = (POLKIT_PATH,) @classmethod - def cmd_for_missing_scripts(kls, frompath): + def cmd_for_missing_scripts(kls, frompath, pol_file): """ - Returns a command that can copy the missing scripts. + Returns a sh script that can copy the missing files. + + :param frompath: The path where the up/down scripts live + :type frompath: str + :param pol_file: The path where the dynamically generated + policy file lives + :type pol_file: str + :rtype: str """ to = kls.SYSTEM_CONFIG - cmd = "#!/bin/sh\nset -e\nmkdir -p %s\ncp %s/%s %s\ncp %s/%s %s" % ( + cmd = "#!/bin/sh\nset -e\nmkdir -p %s\n" + cmd += "cp %s/%s %s\ncp \"%s\" \"%s\"" % ( to, frompath, kls.UP_DOWN_FILE, to, - frompath, kls.POLKIT_FILE, kls.POLKIT_PATH) + pol_file, kls.POLKIT_PATH) return cmd @classmethod |