summaryrefslogtreecommitdiff
path: root/scripts/keepalived
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-12-10 18:50:49 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-12-10 18:50:49 -0800
commit6988b6071410e4aff1bf05ef7df05ad26e075fe8 (patch)
tree7c611672245b229934791fb30fccf06d7993e9a4 /scripts/keepalived
parent50a70c54c6d57423750ab93dfbb3f12dd98032c3 (diff)
downloadvyatta-cfg-system-6988b6071410e4aff1bf05ef7df05ad26e075fe8.tar.gz
vyatta-cfg-system-6988b6071410e4aff1bf05ef7df05ad26e075fe8.zip
Fix 6554: clear vrrp master tab completion results in cli api error
Diffstat (limited to 'scripts/keepalived')
-rwxr-xr-xscripts/keepalived/vyatta-keepalived.pl41
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