From 9d44f462bcfe80a2f41dcedcf101d48cb0f142e0 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 11 Jul 2006 00:45:07 +0000 Subject: [PATCH] Wrap grep around double quotes so it doesn't bomb out on the shell. --- etc/inc/filter.inc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a67b0e38e7..883b30a6e8 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -230,11 +230,6 @@ function filter_configure_sync() { } } - update_filter_reload_status("Syncing CARP data"); - - /* sync carp entries to other firewalls */ - carp_sync_client(); - /* we need a way to let a user run a shell cmd after each filter_configure() call. run this xml command after @@ -246,9 +241,15 @@ function filter_configure_sync() { /* run items scheduled for after filter configure run */ foreach($after_filter_configure_run as $afcr) { + log_error("Starting {$afcr}"); mwexec($afcr); } + update_filter_reload_status("Syncing CARP data"); + + /* sync carp entries to other firewalls */ + carp_sync_client(); + update_filter_reload_status("Done"); return 0; @@ -785,10 +786,14 @@ function filter_nat_rules_generate() { * a ftp server then launch a helper */ $dontinstallrdr = false; + log_error("FTP proxy"); if($target <> "") { + log_error("target <> ''"); if($extport[0] == "21" and !isset($config['interfaces'][strtolower($rule['interface'])]['disableftpproxy'])) { - $helpers = exec("/bin/ps awux | grep {$target} -b {$external_address} | grep -v grep"); + log_error("Testing for /bin/ps awux | grep \"{$target} -b {$external_address}\" | grep -v grep"); + $helpers = exec("/bin/ps awux | grep \"{$target} -b {$external_address}\" | grep -v grep"); if(!$helpers) { + log_error("no helper detected"); $external_address = $rule['external-address']; if($external_address == "") $external_address = find_interface_ip(get_real_wan_interface()); @@ -2638,4 +2643,4 @@ function return_vpn_subnet($adr) { } -?> +?> \ No newline at end of file