aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-11-02 14:24:04 -0400
committerScott Ullrich <sullrich@gmail.com>2011-11-02 14:24:04 -0400
commit031c3ca2286509acad65e52e2ea3fbc857bafbc8 (patch)
treeef3e84a0997081fb7fa019f58b7656bf40c8cba3 /config
parentdcac18c43bf29314f458e69ed40673e958f54cde (diff)
downloadpfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.tar.gz
pfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.tar.bz2
pfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.zip
Include zip package
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 50113d89..18ca1859 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -277,6 +277,7 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $usetoke
function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy, $advancedoptions) {
global $config, $g, $input_errors;
+ $uname_p = trim(exec("uname -p"));
$ovpndir = "/usr/local/share/openvpn";
$workdir = "{$ovpndir}/client-export";
@@ -389,7 +390,10 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
else
$files .= "procchain-standard";
- exec("/usr/local/libexec/p7zip/7z -y a archive.7z {$files}");
+ if(file_exists("/usr/pbi/p7zip-{$uname_p}/bin/7z"))
+ exec("/usr/pbi/p7zip-{$uname_p}/bin/7z -y a archive.7z {$files}");
+ else
+ exec("/usr/local/libexec/p7zip/7z -y a archive.7z {$files}");
// create the final installer
$outfile = "{$tempdir}-install.exe";
@@ -407,6 +411,7 @@ function openvpn_client_export_installer($srvid, $usrid, $crtid, $useaddr, $uset
function viscosity_openvpn_client_config_exporter($srvid, $usrid, $crtid, $useaddr, $usetoken, $outpass, $proxy, $advancedoptions) {
global $config, $g;
+ $uname_p = trim(exec("uname -p"));
$ovpndir = "/usr/local/share/openvpn/";
if (!file_exists($workdir . "/template/openvpn-install.exe"))
@@ -525,7 +530,10 @@ EOF;
}
// Zip Viscosity file
- exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$zipfile} Viscosity.visc");
+ if(file_exists())
+
+ else
+ exec("cd {$tempdir}/.. && /usr/local/bin/zip -r {$zipfile} Viscosity.visc");
// Remove temporary directory
exec("rm -rf {$tempdir}");