aboutsummaryrefslogtreecommitdiffstats
path: root/config/dnsmasq-edns/dnsmasq-edns.inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-05-04 21:23:35 -0400
committerjim-p <jim@pingle.org>2010-05-04 21:23:35 -0400
commit62c6b9de70ba470941a7b1bd7922b61f005a91e5 (patch)
tree9be29ee25457b9c596e67e085587365354b61be5 /config/dnsmasq-edns/dnsmasq-edns.inc
parentee7d8c15e499214c78b29c99d3a275973e8a3b7c (diff)
downloadpfsense-packages-62c6b9de70ba470941a7b1bd7922b61f005a91e5.tar.gz
pfsense-packages-62c6b9de70ba470941a7b1bd7922b61f005a91e5.tar.bz2
pfsense-packages-62c6b9de70ba470941a7b1bd7922b61f005a91e5.zip
Add a patch package to increase dnsmasq's EDNS size to 4096 if people need it.
Diffstat (limited to 'config/dnsmasq-edns/dnsmasq-edns.inc')
-rw-r--r--config/dnsmasq-edns/dnsmasq-edns.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/dnsmasq-edns/dnsmasq-edns.inc b/config/dnsmasq-edns/dnsmasq-edns.inc
new file mode 100644
index 00000000..dd84271f
--- /dev/null
+++ b/config/dnsmasq-edns/dnsmasq-edns.inc
@@ -0,0 +1,18 @@
+<?php
+
+function dnsmasq-edns_install() {
+ global $g, $config;
+
+ // Test to make sure the patch is not already applied.
+ $out = `patch -fslC --reverse -p1 -b .before_dnsmasq-edns -d / -i /usr/local/pkg/dnsmasq-edns.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_dnsmasq-edns -d / -i /usr/local/pkg/dnsmasq-edns.patch |& grep -ci reject`;
+ if ($out == 0) {
+ // The patch should apply cleanly, let 'er rip.
+ mwexec("patch -fsNl -p1 -b .before_dnsmasq-edns -d / -i /usr/local/pkg/dnsmasq-edns.patch ");
+ }
+ }
+}
+
+?> \ No newline at end of file