aboutsummaryrefslogtreecommitdiffstats
path: root/config/packetcapturefix/packetcapturefix.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-05-19 08:43:10 -0400
committerjim-p <jimp@pfsense.org>2010-05-19 08:43:10 -0400
commita2f538d3dce281e3b17202637161ead8937bb942 (patch)
tree425af59a2f96d8eff27f962ea717ed0cea315fa7 /config/packetcapturefix/packetcapturefix.inc
parent1c7267a22f0d3f85814b5a49005e27a534dd3568 (diff)
downloadpfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.tar.gz
pfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.tar.bz2
pfsense-packages-a2f538d3dce281e3b17202637161ead8937bb942.zip
Add a package with a patch that fixes packet capture on 1.2.3 nanobsd.
Diffstat (limited to 'config/packetcapturefix/packetcapturefix.inc')
-rw-r--r--config/packetcapturefix/packetcapturefix.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/packetcapturefix/packetcapturefix.inc b/config/packetcapturefix/packetcapturefix.inc
new file mode 100644
index 00000000..8636c25c
--- /dev/null
+++ b/config/packetcapturefix/packetcapturefix.inc
@@ -0,0 +1,18 @@
+<?php
+
+function packetcapturefix_install() {
+ global $g, $config;
+
+ // Test to make sure the patch is not already applied.
+ $out = `patch -fslC --reverse -p1 -b .before_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.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_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.patch |& grep -ci reject`;
+ if ($out == 0) {
+ // The patch should apply cleanly, let 'er rip.
+ mwexec("patch -fsNl -p1 -b .before_packetcapturefix -d / -i /usr/local/pkg/packetcapturefix.patch ");
+ }
+ }
+}
+
+?> \ No newline at end of file