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
This commit is contained in:
Scott Ullrich 2008-12-15 17:43:12 +00:00
parent ef97a399ee
commit cad40f607c

View File

@ -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");