From 2c71f8d7ab0a46c0356fffcaea98d580dc7daebc Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Thu, 1 Jul 2010 14:09:32 -0700 Subject: Fix 5675: clearing vrrp master for an interface group removes sync-group config from keepalived.conf --- scripts/keepalived/vyatta-clear-vrrp.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts') 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; } -- cgit v1.2.3