summaryrefslogtreecommitdiff
path: root/scripts/keepalived/vyatta-show-vrrp.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/keepalived/vyatta-show-vrrp.pl')
-rwxr-xr-xscripts/keepalived/vyatta-show-vrrp.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/keepalived/vyatta-show-vrrp.pl b/scripts/keepalived/vyatta-show-vrrp.pl
index 934808f6..9228eeeb 100755
--- a/scripts/keepalived/vyatta-show-vrrp.pl
+++ b/scripts/keepalived/vyatta-show-vrrp.pl
@@ -147,17 +147,21 @@ sub vrrp_show {
#
# main
#
-my $intf = "eth";
-if ($#ARGV > -1) {
+my $intf = "eth";
+my $group = "all";
+if ($#ARGV == 0) {
$intf = $ARGV[0];
}
+if ($#ARGV == 1) {
+ $group = $ARGV[1];
+}
if (!VyattaKeepalived::is_running()) {
print "VRRP isn't running\n";
exit 1;
}
-my @state_files = VyattaKeepalived::get_state_files($intf);
+my @state_files = VyattaKeepalived::get_state_files($intf, $group);
foreach my $state_file (@state_files) {
vrrp_show($state_file);
}