diff options
author | jim-p <jimp@pfsense.org> | 2013-04-24 09:44:36 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2013-04-24 09:46:05 -0400 |
commit | b38188a3a7a3eeef3d9614c82dd91db7d3a3af5a (patch) | |
tree | be9f0a4d05bcb4a978d034512695bdc3f5248000 /config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc | |
parent | 9c773ca84fe7884884676a9b5925556abfec5c88 (diff) | |
download | pfsense-packages-b38188a3a7a3eeef3d9614c82dd91db7d3a3af5a.tar.gz pfsense-packages-b38188a3a7a3eeef3d9614c82dd91db7d3a3af5a.tar.bz2 pfsense-packages-b38188a3a7a3eeef3d9614c82dd91db7d3a3af5a.zip |
Fixup tap package for 2.0.3, parts of the patch were not applying.
Also, rather than using this package, you can use the patch directly in the System Patches package:
2.0.1 and 2.0.2 use http://www.pfsense.com/packages/config/openvpn_tapfix_20x/openvpn_tapfix_20x.patch
2.0.3 uses http://www.pfsense.com/packages/config/openvpn_tapfix_20x/openvpn_tapfix_203.patch
Diffstat (limited to 'config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc')
-rw-r--r-- | config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc b/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc index 197a5e25..8f574212 100644 --- a/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc +++ b/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc @@ -2,15 +2,22 @@ function openvpn_tapfix_20x_install() { global $g, $config; - + $pfs_version = substr(trim(file_get_contents("/etc/version")),0,5); + switch ($pfs_version) { + case "2.0.3": + $patch_file = "openvpn_tapfix_203.patch"; + break; + default: + $patch_file = "openvpn_tapfix_20x.patch"; + } // Test to make sure the patch is not already applied. - $out = `patch -fslC --reverse -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/openvpn_tapfix_20x.patch |& grep -ci reject`; + $out = `patch -fslC --reverse -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/{$patch_file} |& grep -ci reject`; if ($out == 0) { // If the patch has not already been applied, test to see if it will apply cleanly. - $out = `patch -fsNlC -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/openvpn_tapfix_20x.patch |& grep -ci reject`; + $out = `patch -fsNlC -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/{$patch_file} |& grep -ci reject`; if ($out == 0) { // The patch should apply cleanly, let 'er rip. - mwexec("patch -fsNl -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/openvpn_tapfix_20x.patch "); + mwexec("patch -fsNl -p1 -b .before_openvpn_tapfix_20x -d / -i /usr/local/pkg/{$patch_file} "); } } } |