diff options
author | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-03 16:29:20 -0700 |
---|---|---|
committer | Mohit Mehta <mohit.mehta@vyatta.com> | 2010-06-03 16:29:20 -0700 |
commit | fa76fb6b1d99218cfd3a181b8dcc718d83906f93 (patch) | |
tree | e20e2e2519c6e2dd52515d1702271699ee1f1d65 /scripts | |
parent | f2028e6a105b3136f881635c2bbe64216dffa7e3 (diff) | |
download | vyatta-cfg-system-fa76fb6b1d99218cfd3a181b8dcc718d83906f93.tar.gz vyatta-cfg-system-fa76fb6b1d99218cfd3a181b8dcc718d83906f93.zip |
move list functions to vrrp perl module so other scripts can use it as well
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index 2c84f252..b891bdf7 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -205,7 +205,9 @@ sub vrrp_get_sync_groups { foreach my $vrrp_instance ( 0 .. $#{ $HoA_sync_groups{$sync_group} } ) { $output .= "\t\t$HoA_sync_groups{$sync_group}[$vrrp_instance]\n"; } - $output .= "\t\}\n\}\n"; + $output .= "\t\}\n"; + ## add conntrack-sync part here if configured ## + $output .= "\}\n"; } return $output; } @@ -354,36 +356,6 @@ sub keepalived_write_file { close $fh; } -sub list_vrrp_intf { - my $config = new Vyatta::Config; - my @intfs = (); - - foreach my $name ( getInterfaces() ) { - my $intf = new Vyatta::Interface($name); - next unless $intf; - my $path = $intf->path(); - $config->setLevel($path); - push @intfs, $name if $config->existsOrig("vrrp"); - } - - return @intfs; -} - -sub list_vrrp_group { - my ($name) = @_; - my $config = new Vyatta::Config; - my $path; - - my $intf = new Vyatta::Interface($name); - next unless $intf; - $path = $intf->path(); - $path .= " vrrp vrrp-group"; - $config->setLevel($path); - my @groups = $config->listOrigNodes(); - return @groups; -} - - # # main # |