summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-03-08 17:49:50 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-03-08 17:49:50 -0700
commitb9b2f7ade2fee7b99653b512fe3d573466f68c1c (patch)
tree4228a90f66a8f8a682ec33cb11c12a0f23fd858b
parent28f5a2693e7e5b9aeff0527ce785215293696513 (diff)
downloadvyatta-op-b9b2f7ade2fee7b99653b512fe3d573466f68c1c.tar.gz
vyatta-op-b9b2f7ade2fee7b99653b512fe3d573466f68c1c.zip
Fix 4183: no auto completion for 'clear vrrp interfaces <> group ?'.
Need to find a better way to pass vars than $COMP_WORDS{}.
-rw-r--r--templates/clear/vrrp/master/interface/node.def1
-rw-r--r--templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def2
-rw-r--r--templates/clear/vrrp/master/interface/node.tag/node.def5
-rw-r--r--templates/show/vrrp/interface/node.tag/group/node.tag/node.def2
-rw-r--r--templates/show/vrrp/interface/node.tag/node.def4
5 files changed, 5 insertions, 9 deletions
diff --git a/templates/clear/vrrp/master/interface/node.def b/templates/clear/vrrp/master/interface/node.def
index 0a4ecc9..b5e5fd3 100644
--- a/templates/clear/vrrp/master/interface/node.def
+++ b/templates/clear/vrrp/master/interface/node.def
@@ -1 +1,2 @@
help: Clear VRRP master for a specific interface
+allowed: /opt/vyatta/bin/sudo-users/vyatta-clear-vrrp.pl --action=find_vrrp_intf
diff --git a/templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def b/templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def
index 71a1591..92abf3c 100644
--- a/templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def
+++ b/templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def
@@ -1,3 +1,3 @@
help: clear VRRP master for specified interface and group
-allowed: echo -n '<VRRP_GROUP>'
+allowed: /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action=list-vrrp-group --intf "${COMP_WORDS[COMP_CWORD-2]}"
run: sudo /opt/vyatta/bin/sudo-users/vyatta-clear-vrrp.pl --vrrp-action clear_master --intf "$5" --group "$7"
diff --git a/templates/clear/vrrp/master/interface/node.tag/node.def b/templates/clear/vrrp/master/interface/node.tag/node.def
index a9caa52..cd68d89 100644
--- a/templates/clear/vrrp/master/interface/node.tag/node.def
+++ b/templates/clear/vrrp/master/interface/node.tag/node.def
@@ -1,5 +1,2 @@
help: Show VRRP information for specified interface
-allowed: local -a array ;
- array=( /sys/class/net/eth* ) ;
- echo -n ${array[@]##*/}
-
+allowed: /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action=list-vrrp-intf
diff --git a/templates/show/vrrp/interface/node.tag/group/node.tag/node.def b/templates/show/vrrp/interface/node.tag/group/node.tag/node.def
index cf74912..de7eb12 100644
--- a/templates/show/vrrp/interface/node.tag/group/node.tag/node.def
+++ b/templates/show/vrrp/interface/node.tag/group/node.tag/node.def
@@ -1,3 +1,3 @@
help: Show VRRP information for specified interface and group
-allowed: echo -n '<VRRP_GROUP>'
+allowed: /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action=list-vrrp-group --intf "${COMP_WORDS[COMP_CWORD-2]}"
run: sudo /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl "$4" "$6"
diff --git a/templates/show/vrrp/interface/node.tag/node.def b/templates/show/vrrp/interface/node.tag/node.def
index f403060..1defd31 100644
--- a/templates/show/vrrp/interface/node.tag/node.def
+++ b/templates/show/vrrp/interface/node.tag/node.def
@@ -1,5 +1,3 @@
help: Show VRRP information for specified interface
-allowed: local -a array ;
- array=( /sys/class/net/eth* ) ;
- echo -n ${array[@]##*/}
+allowed: /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action=list-vrrp-intf
run: sudo /opt/vyatta/bin/sudo-users/vyatta-show-vrrp.pl "$4"