summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-15 17:43:12 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-15 17:43:12 +0000
commitcad40f607c8e78de3f7e562ca99d21e6a052d377 (patch)
tree1093c87a6534734f3d2c9af4297405204c52e319
parentef97a399ee10a0a5680fa3897a662416dbaffe5e (diff)
downloadpfsense-cad40f607c8e78de3f7e562ca99d21e6a052d377.zip
pfsense-cad40f607c8e78de3f7e562ca99d21e6a052d377.tar.gz
Write out all commands that should be run after filter load instead
of requiring the command to be run 5+ times for certain scenarios. Fix sponsored by BSD Perimeter
-rw-r--r--etc/inc/filter.inc7
1 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index ff97ae0..f7bbc01 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -259,11 +259,10 @@ function filter_configure_sync() {
unlink_if_exists("/usr/local/pkg/pf/carp_sync_client.php");
/* run items scheduled for after filter configure run */
- foreach($after_filter_configure_run as $afcr) {
- $fda = fopen("/tmp/commands.txt", "w");
+ $fda = fopen("/tmp/commands.txt", "w");
+ foreach($after_filter_configure_run as $afcr)
fwrite($fda, $afcr . "\n");
- fclose($fda);
- }
+ fclose($fda);
if(file_exists("/tmp/commands.txt")) {
mwexec("sh /tmp/commands.txt &");
unlink("/tmp/commands.txt");
OpenPOWER on IntegriCloud