diff options
author | Jim Pingle <jim@pingle.org> | 2009-02-28 21:48:39 -0500 |
---|---|---|
committer | Jim Pingle <jim@pingle.org> | 2009-02-28 21:48:39 -0500 |
commit | 7da7cf4e7e7a162c9ac44d4ffa7f986c022a75be (patch) | |
tree | 31235b4392935db1214f6bd07e2305740be1b497 /config/onatproto/onatproto.inc | |
parent | 8bab9b24ba7dd0516255515fe6a0a0c8675c11de (diff) | |
download | pfsense-packages-7da7cf4e7e7a162c9ac44d4ffa7f986c022a75be.tar.gz pfsense-packages-7da7cf4e7e7a162c9ac44d4ffa7f986c022a75be.tar.bz2 pfsense-packages-7da7cf4e7e7a162c9ac44d4ffa7f986c022a75be.zip |
Add a package for 1.2.x that will give protocol options for Manual Outbound NAT, since the change was too dramatic to merge into the feature-complete RELENG_1_2.
Diffstat (limited to 'config/onatproto/onatproto.inc')
-rw-r--r-- | config/onatproto/onatproto.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/config/onatproto/onatproto.inc b/config/onatproto/onatproto.inc new file mode 100644 index 00000000..93454107 --- /dev/null +++ b/config/onatproto/onatproto.inc @@ -0,0 +1,18 @@ +<?php + +function onatproto_install() { + global $g, $config; + + // Test to make sure the patch is not already applied. + $out = `patch -fslC --reverse -p1 -b .before_onatproto -d / -i /usr/local/pkg/onatproto.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_onatproto -d / -i /usr/local/pkg/onatproto.patch |& grep -ci reject`; + if ($out == 0) { + // The patch should apply cleanly, let 'er rip. + mwexec("patch -fsNl -p1 -b .before_onatproto -d / -i /usr/local/pkg/onatproto.patch "); + } + } +} + +?>
\ No newline at end of file |