aboutsummaryrefslogtreecommitdiffstats
path: root/config/iprangealiases/iprangealiases.inc
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-03-10 17:37:57 -0500
committerjim-p <jim@pingle.org>2010-03-10 17:37:57 -0500
commit0fd687c306b6ced446df87b2bfdcdc480a5eea02 (patch)
tree26c1b168a68d5edf6d3f1cf0e51902e1d50717ba /config/iprangealiases/iprangealiases.inc
parentb4c5f8f850f925b6d1446da697c4f1b1d12b70a8 (diff)
downloadpfsense-packages-0fd687c306b6ced446df87b2bfdcdc480a5eea02.tar.gz
pfsense-packages-0fd687c306b6ced446df87b2bfdcdc480a5eea02.tar.bz2
pfsense-packages-0fd687c306b6ced446df87b2bfdcdc480a5eea02.zip
Add a package which backports the IP Range in Network Aliases functionality from 2.0 to 1.2.3.
Diffstat (limited to 'config/iprangealiases/iprangealiases.inc')
-rw-r--r--config/iprangealiases/iprangealiases.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/iprangealiases/iprangealiases.inc b/config/iprangealiases/iprangealiases.inc
new file mode 100644
index 00000000..036bc195
--- /dev/null
+++ b/config/iprangealiases/iprangealiases.inc
@@ -0,0 +1,18 @@
+<?php
+
+function iprangealiases_install() {
+ global $g, $config;
+
+ // Test to make sure the patch is not already applied.
+ $out = `patch -fslC --reverse -p1 -b .before_iprangealiases -d / -i /usr/local/pkg/iprangealiases.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_iprangealiases -d / -i /usr/local/pkg/iprangealiases.patch |& grep -ci reject`;
+ if ($out == 0) {
+ // The patch should apply cleanly, let 'er rip.
+ mwexec("patch -fsNl -p1 -b .before_iprangealiases -d / -i /usr/local/pkg/iprangealiases.patch ");
+ }
+ }
+}
+
+?> \ No newline at end of file