aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rwxr-xr-xconfig/openvpn-client-export/openvpn-client-export.inc20
1 files changed, 12 insertions, 8 deletions
diff --git a/config/openvpn-client-export/openvpn-client-export.inc b/config/openvpn-client-export/openvpn-client-export.inc
index 1e76c743..9488119e 100755
--- a/config/openvpn-client-export/openvpn-client-export.inc
+++ b/config/openvpn-client-export/openvpn-client-export.inc
@@ -44,16 +44,20 @@ $current_openvpn_version_rev = "03";
function openvpn_client_export_install() {
global $current_openvpn_version;
- conf_mount_rw();
- $tarpath = "/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz";
- $ovpndir = "/usr/local/share/openvpn";
- $workdir = "{$ovpndir}/client-export";
- if (!is_dir($workdir))
- mkdir($workdir, 0777, true);
+ $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pfs_version == "2.1" || $pfs_version == "2.2") {
+ conf_mount_rw();
+ $tarpath = "/usr/local/pkg/openvpn-client-export-{$current_openvpn_version}.tgz";
+ $ovpndir = "/usr/local/share/openvpn";
+ $workdir = "{$ovpndir}/client-export";
- exec("/usr/bin/tar zxf {$tarpath} -C {$ovpndir}");
- conf_mount_ro();
+ if (!is_dir($workdir))
+ mkdir($workdir, 0777, true);
+
+ exec("/usr/bin/tar zxf {$tarpath} -C {$ovpndir}");
+ conf_mount_ro();
+ }
}
function openvpn_client_export_deinstall() {