summaryrefslogtreecommitdiff
path: root/scripts/keepalived/vyatta-show-vrrp.pl
diff options
context:
space:
mode:
authorDavid S. Madole <david@omd3.com>2009-09-27 15:29:17 -0400
committerStig Thormodsrud <stig@vyatta.com>2009-10-31 12:52:35 -0700
commit1b8212fe55cc9d83601acc52b43d3e7116542eda (patch)
tree44308d0726619ddc3f9575080b31f776cb471c30 /scripts/keepalived/vyatta-show-vrrp.pl
parent5d2999ffb3a93966091c095cc85446ec62834c0f (diff)
downloadvyatta-cfg-quagga-1b8212fe55cc9d83601acc52b43d3e7116542eda.tar.gz
vyatta-cfg-quagga-1b8212fe55cc9d83601acc52b43d3e7116542eda.zip
Add VRRP capability to bonding interfaces and vifs of bonding interfaces.
Diffstat (limited to 'scripts/keepalived/vyatta-show-vrrp.pl')
-rwxr-xr-xscripts/keepalived/vyatta-show-vrrp.pl14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/keepalived/vyatta-show-vrrp.pl b/scripts/keepalived/vyatta-show-vrrp.pl
index 3015bc92..5ec2e8ad 100755
--- a/scripts/keepalived/vyatta-show-vrrp.pl
+++ b/scripts/keepalived/vyatta-show-vrrp.pl
@@ -129,7 +129,7 @@ sub get_master_info {
my $source_ip = (vrrp_get_config($intf, $group))[0];
# arping doesn't seem to work for vlans
- if ($intf =~ /(eth\d+).\d+/) {
+ if ($intf =~ /(eth\d+|bond\d+).\d+/) {
$intf = $1;
}
system("/usr/bin/arping -c1 -f -I $intf -s $source_ip $vip > $arp_file");
@@ -251,7 +251,7 @@ sub vrrp_show {
#
# main
#
-my $intf = "eth";
+my @intfs = ("eth", "bond");
my $group = "all";
my $showsummary = 0;
@@ -259,7 +259,7 @@ if ($#ARGV >= 0) {
if ($ARGV[0] eq "summary") {
$showsummary = 1;
} else {
- $intf = $ARGV[0];
+ @intfs = ($ARGV[0]);
}
}
@@ -284,9 +284,11 @@ if ($showsummary == 1) {
$display_func = \&vrrp_show;
}
-my @state_files = Vyatta::Keepalived::get_state_files($intf, $group);
-foreach my $state_file (@state_files) {
- &$display_func($state_file);
+foreach my $intf (@intfs) {
+ my @state_files = Vyatta::Keepalived::get_state_files($intf, $group);
+ foreach my $state_file (@state_files) {
+ &$display_func($state_file);
+ }
}
exit 0;