From e0bcb1df5f596f9a66f24b296418506597116e62 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 14 Mar 2005 19:55:02 +0000 Subject: * Allow aliases, nat, traffic shaping and firewall rules syncing status to be turned on or off --- packages/carp_sync_server.php | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'packages/carp_sync_server.php') diff --git a/packages/carp_sync_server.php b/packages/carp_sync_server.php index cb292488..417a59f6 100644 --- a/packages/carp_sync_server.php +++ b/packages/carp_sync_server.php @@ -40,13 +40,24 @@ if($config['installedpackages']['carpsettings']['config'] != "") $rules = return_filename_as_string("{$g['tmp_path']}/rules_section.txt"); $aliases = return_filename_as_string("{$g['tmp_path']}/aliases_section.txt"); $nat = return_filename_as_string("{$g['tmp_path']}/nat_section.txt"); - restore_config_section("filter", $rules); - restore_config_section("aliases", $aliases); - restore_config_section("nat", $nat); + $trafficshaper = return_filename_as_string("{$g['tmp_path']}/trafficshaper_section.txt"); + if($rules <> "") { + restore_config_section("filter", $rules); + unlink("{$g['tmp_path']}/rules_section.txt"); + } + if($aliases <> "") { + restore_config_section("aliases", $aliases); + unlink("{$g['tmp_path']}/aliases_section.txt"); + } + if($nat <> "") { + restore_config_section("nat", $nat); + unlink("{$g['tmp_path']}/nat_section.txt"); + } + if($trafficshaper <> "") { + restore_config_section("shaper", $trafficshaper); + unlink("{$g['tmp_path']}/nat_section.txt"); + } filter_configure(); - unlink("{$g['tmp_path']}/rules_section.txt"); - unlink("{$g['tmp_path']}/aliases_section.txt"); - unlink("{$g['tmp_path']}/nat_section.txt"); } ?> \ No newline at end of file -- cgit v1.2.3