diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-11-02 14:24:04 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-11-02 14:24:04 -0400 |
commit | 031c3ca2286509acad65e52e2ea3fbc857bafbc8 (patch) | |
tree | ef3e84a0997081fb7fa019f58b7656bf40c8cba3 | |
parent | dcac18c43bf29314f458e69ed40673e958f54cde (diff) | |
download | pfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.tar.gz pfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.tar.bz2 pfsense-packages-031c3ca2286509acad65e52e2ea3fbc857bafbc8.zip |
Include zip package
-rwxr-xr-x | config/openvpn-client-export/openvpn-client-export.inc | 12 | ||||
-rw-r--r-- | pkg_config.8.xml.amd64 | 2 |
2 files changed, 11 insertions, 3 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}"); diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 32a56781..25ec25fb 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -990,7 +990,7 @@ <descr>Allows a pre-configured OpenVPN Windows Client or or Mac OSX's Viscosity configuration bundle to be exported directly from pfSense.</descr> <category>Security</category> <depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url> - <depends_on_package_pbi>p7zip-9.20.1-amd64.pbi</depends_on_package_pbi> + <depends_on_package_pbi>p7zip-9.20.1-amd64.pbi zip-3.0-amd64.pbi</depends_on_package_pbi> <depends_on_package>p7zip-9.13.tbz</depends_on_package> <depends_on_package>zip-3.0.tbz</depends_on_package> <build_port_path>/usr/ports/archivers/p7zip</build_port_path> |