diff options
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index f258e7d7..9b8358d2 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -456,6 +456,31 @@ if ( !defined $action ) { exit 1; } + +# +# run op mode command first +# +if ( $action eq "list-vrrp-intf" ) { + my @intfs = list_vrrp_intf(); + print join( ' ', @intfs ); + exit 0; +} + +if ( $action eq "list-vrrp-group" ) { + if ( !defined $vrrp_intf ) { + print "must include interface\n"; + exit 1; + } + my @groups = list_vrrp_group($vrrp_intf); + print join( ' ', @groups ); + exit 0; +} + +# +# end of op mode commands +# + + # # This script can be called from two places : # 1. a vrrp node under one of the interfaces @@ -595,22 +620,6 @@ if ( $action eq "delete" ) { exit 0; } -if ( $action eq "list-vrrp-intf" ) { - my @intfs = list_vrrp_intf(); - print join( ' ', @intfs ); - exit 0; -} - -if ( $action eq "list-vrrp-group" ) { - if ( !defined $vrrp_intf ) { - print "must include interface\n"; - exit 1; - } - my @groups = list_vrrp_group($vrrp_intf); - print join( ' ', @groups ); - exit 0; -} - exit 0; # end of file |