summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2011-01-26 14:24:13 -0800
committerStig Thormodsrud <stig@vyatta.com>2011-01-26 14:24:13 -0800
commit8529fbe7ed23023e936f5c7cab9663007d0476d3 (patch)
tree7417ee30a24eb04d0f49cab85054eb3d0d9369a1
parent67e9fd8a4a2994463045a87e575722bbf074d695 (diff)
downloadvyatta-cfg-system-8529fbe7ed23023e936f5c7cab9663007d0476d3.tar.gz
vyatta-cfg-system-8529fbe7ed23023e936f5c7cab9663007d0476d3.zip
Fix vrrp duplicate generation of last sync-group entry.
-rwxr-xr-xscripts/keepalived/vyatta-keepalived.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl
index 9b8358d2..7a113469 100755
--- a/scripts/keepalived/vyatta-keepalived.pl
+++ b/scripts/keepalived/vyatta-keepalived.pl
@@ -391,11 +391,12 @@ sub remove_from_changes {
sub vrrp_update_config {
my @errs = ();
- my $output = "#\n# autogenerated by $0\n#\n\n";
+ my $output;
my $config = new Vyatta::Config;
my $vrrp_instances = 0;
+ %HoA_sync_groups = ();
foreach my $name ( getInterfaces() ) {
my $intf = new Vyatta::Interface($name);
next unless $intf;
@@ -427,6 +428,7 @@ sub vrrp_update_config {
if ( defined $sync_groups && $sync_groups ne "" ) {
$output = $sync_groups . $output;
}
+ $output = "#\n# autogenerated by $0\n#\n\n" . $output;
keepalived_write_file( $conf_file, $output );
}
return ( $vrrp_instances, @errs );