diff options
author | jim-p <jimp@pfsense.org> | 2011-11-11 10:56:01 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-11-11 10:56:01 -0500 |
commit | dafa29e37fad8307c77d17808dae28d3eefa9da9 (patch) | |
tree | 50a7510db60b6787687ea1c568e6d458a6a77647 /config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc | |
parent | 14201ad21c92700ef26daf442f6d32a400e20b7f (diff) | |
download | pfsense-packages-dafa29e37fad8307c77d17808dae28d3eefa9da9.tar.gz pfsense-packages-dafa29e37fad8307c77d17808dae28d3eefa9da9.tar.bz2 pfsense-packages-dafa29e37fad8307c77d17808dae28d3eefa9da9.zip |
Add a package to fix OpenVPN tap bridging on 2.0/2.0.1 (needs testing)
Diffstat (limited to 'config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc')
-rw-r--r-- | config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc b/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc new file mode 100644 index 00000000..197a5e25 --- /dev/null +++ b/config/openvpn_tapfix_20x/openvpn_tapfix_20x.inc @@ -0,0 +1,18 @@ +<?php + +function openvpn_tapfix_20x_install() { + global $g, $config; + + // 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`; + 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`; + 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 "); + } + } +} + +?>
\ No newline at end of file |