From cad40f607c8e78de3f7e562ca99d21e6a052d377 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 15 Dec 2008 17:43:12 +0000 Subject: [PATCH] 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 --- etc/inc/filter.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index ff97ae0961..f7bbc01457 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");