diff options
author | rob <rob@ubuntu.local> | 2009-04-11 02:53:58 -0700 |
---|---|---|
committer | rob <rob@ubuntu.local> | 2009-04-11 02:53:58 -0700 |
commit | 00ca1313d055ddf8c2823b7f76c553ed75d765dd (patch) | |
tree | 23a611405fa7c99dc957b87aed83537707885565 /config/onatproto/onatproto.inc | |
parent | 83d4c55637161dc97fd611fa4faf3f1872dcc8da (diff) | |
parent | 81372f3fb6e45543837b7e0746b9c5f4f2b50c93 (diff) | |
download | pfsense-packages-00ca1313d055ddf8c2823b7f76c553ed75d765dd.tar.gz pfsense-packages-00ca1313d055ddf8c2823b7f76c553ed75d765dd.tar.bz2 pfsense-packages-00ca1313d055ddf8c2823b7f76c553ed75d765dd.zip |
Merge commit 'mainline/master'
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 |