aboutsummaryrefslogtreecommitdiffstats
path: root/config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-06-24 15:21:03 -0400
committerjim-p <jimp@pfsense.org>2010-06-24 15:21:03 -0400
commit83012e81e32bcf735e066c7361ac8739a0303367 (patch)
tree56fa37d562452c322d4504de601f4d86dc3f182a /config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc
parent03167b8e1da874f1ae0fa70089a60a7baaae0de0 (diff)
downloadpfsense-packages-83012e81e32bcf735e066c7361ac8739a0303367.tar.gz
pfsense-packages-83012e81e32bcf735e066c7361ac8739a0303367.tar.bz2
pfsense-packages-83012e81e32bcf735e066c7361ac8739a0303367.zip
Add small patch package to stop /etc/rc from removing /tmp/filter_dirty before it can be properly processed. Removing /tmp/filter_dirty will cause some package rules (such as Squid) to not be present at the end of the boot process.
Diffstat (limited to 'config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc')
-rw-r--r--config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc b/config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc
new file mode 100644
index 00000000..85b5edf6
--- /dev/null
+++ b/config/patch_rc_filter_dirty/patch_rc_filter_dirty.inc
@@ -0,0 +1,18 @@
+<?php
+
+function patch_rc_filter_dirty_install() {
+ global $g, $config;
+
+ // Test to make sure the patch is not already applied.
+ $out = `patch -fslC --reverse -p1 -b .before_patch_rc_filter_dirty -d / -i /usr/local/pkg/patch_rc_filter_dirty.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_patch_rc_filter_dirty -d / -i /usr/local/pkg/patch_rc_filter_dirty.patch |& grep -ci reject`;
+ if ($out == 0) {
+ // The patch should apply cleanly, let 'er rip.
+ mwexec("patch -fsNl -p1 -b .before_patch_rc_filter_dirty -d / -i /usr/local/pkg/patch_rc_filter_dirty.patch ");
+ }
+ }
+}
+
+?> \ No newline at end of file