summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/keepalived/vyatta-show-vrrp.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/keepalived/vyatta-show-vrrp.pl b/scripts/keepalived/vyatta-show-vrrp.pl
index 818d5e40..ecf2bf75 100755
--- a/scripts/keepalived/vyatta-show-vrrp.pl
+++ b/scripts/keepalived/vyatta-show-vrrp.pl
@@ -301,6 +301,16 @@ if ($showsummary == 1) {
}
foreach my $intf (@intfs) {
+ my $intf_vrid;
+ if ($intf =~ m/(\w+)\.(\d+)v(\d+)/){
+ $intf = "$1.$2";
+ $intf_vrid = $3;
+ } elsif ($intf =~ m/(\w+)v(\d+)/){
+ $intf = $1;
+ $intf_vrid = $2;
+ }
+ next if ($group ne 'all' && $intf_vrid && $intf_vrid != $group);
+ $group = $intf_vrid if ($group eq 'all' && $intf_vrid);
my @state_files = Vyatta::Keepalived::get_state_files($intf, $group);
foreach my $state_file (@state_files) {
&$display_func($state_file);