Destroy carp interfaces before config so that after sync deleted interfaces are destroyed

This commit is contained in:
Scott Ullrich 2005-12-18 21:51:30 +00:00
parent aa9fd9e613
commit 467c2c8989

View File

@ -338,6 +338,9 @@ function interfaces_carp_configure() {
global $g, $config, $debugging;
$carp_instances_counter = 0;
$total_carp_interfaces_defined = find_number_of_created_carp_interfaces();
/* destroy previous interfaces */
for($x=0; $x<$total_carp_interfaces_defined; $x++)
mwexec("/sbin/ifconfig carp{$x} delete");
if(isset($config['system']['developerspew'])) {
$mt = microtime();
echo "interfaces_carp_configure() being called $mt\n";