summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-07-01 14:09:32 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-07-01 14:09:32 -0700
commit2c71f8d7ab0a46c0356fffcaea98d580dc7daebc (patch)
treec19fcdfab0c3d4b9501b8c8ef4cea86293b235a9 /scripts
parentfdf4ace78ded63a1ce10158d888e9cac0559cb9c (diff)
downloadvyatta-cfg-quagga-2c71f8d7ab0a46c0356fffcaea98d580dc7daebc.tar.gz
vyatta-cfg-quagga-2c71f8d7ab0a46c0356fffcaea98d580dc7daebc.zip
Fix 5675: clearing vrrp master for an interface group removes sync-group config
from keepalived.conf
Diffstat (limited to 'scripts')
-rw-r--r--scripts/keepalived/vyatta-clear-vrrp.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/keepalived/vyatta-clear-vrrp.pl b/scripts/keepalived/vyatta-clear-vrrp.pl
index 3a9733ed..cdc74cf5 100644
--- a/scripts/keepalived/vyatta-clear-vrrp.pl
+++ b/scripts/keepalived/vyatta-clear-vrrp.pl
@@ -145,18 +145,21 @@ sub set_inital_state {
#
my @vrrp_instances = get_vrrp_intf_group();
+ my $tmp_conf = $conf;
foreach my $hash (@vrrp_instances) {
my $intf = $hash->{'intf'};
my $group = $hash->{'group'};
my $instance = 'vyatta-' . "$intf" . '-' . "$group";
- my ($tmp_conf, $match_instance) =
- vrrp_extract_instance($conf, $instance);
+ my $match_instance;
+ ($tmp_conf, $match_instance) =
+ vrrp_extract_instance($tmp_conf, $instance);
if (defined $match_instance) {
my $init = vrrp_get_init_state($intf, $group, '', 'false');
$match_instance = set_instance_inital_state($match_instance, $init);
$new_conf .= $match_instance . "\n\n";
}
}
+ $new_conf = $tmp_conf . $new_conf;
return $new_conf;
}