summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-06-06 13:50:50 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-06-06 13:50:50 -0700
commitc643034649db860ab720fb2ee06dde767f5b8031 (patch)
treebc6feaae99bf5bd274a70287a7125e4687c49139
parent18dd1b542f69528ac40ade79ee10a6ac77fed9c4 (diff)
downloadvyatta-op-c643034649db860ab720fb2ee06dde767f5b8031.tar.gz
vyatta-op-c643034649db860ab720fb2ee06dde767f5b8031.zip
Fix 787: Add command to force vrrp state transition to backup.
-rw-r--r--templates/clear/vrrp/master/interface/node.def1
-rw-r--r--templates/clear/vrrp/master/interface/node.tag/group/node.def1
-rw-r--r--templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def3
-rw-r--r--templates/clear/vrrp/master/interface/node.tag/node.def5
-rw-r--r--templates/clear/vrrp/master/node.def1
-rw-r--r--templates/clear/vrrp/process/node.def2
6 files changed, 12 insertions, 1 deletions
diff --git a/templates/clear/vrrp/master/interface/node.def b/templates/clear/vrrp/master/interface/node.def
new file mode 100644
index 0000000..0a4ecc9
--- /dev/null
+++ b/templates/clear/vrrp/master/interface/node.def
@@ -0,0 +1 @@
+help: Clear VRRP master for a specific interface
diff --git a/templates/clear/vrrp/master/interface/node.tag/group/node.def b/templates/clear/vrrp/master/interface/node.tag/group/node.def
new file mode 100644
index 0000000..215ee00
--- /dev/null
+++ b/templates/clear/vrrp/master/interface/node.tag/group/node.def
@@ -0,0 +1 @@
+help: clear VRRP master for specified interface and group
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
new file mode 100644
index 0000000..71a1591
--- /dev/null
+++ b/templates/clear/vrrp/master/interface/node.tag/group/node.tag/node.def
@@ -0,0 +1,3 @@
+help: clear VRRP master for specified interface and group
+allowed: echo -n '<VRRP_GROUP>'
+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
new file mode 100644
index 0000000..a9caa52
--- /dev/null
+++ b/templates/clear/vrrp/master/interface/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Show VRRP information for specified interface
+allowed: local -a array ;
+ array=( /sys/class/net/eth* ) ;
+ echo -n ${array[@]##*/}
+
diff --git a/templates/clear/vrrp/master/node.def b/templates/clear/vrrp/master/node.def
new file mode 100644
index 0000000..a5950d6
--- /dev/null
+++ b/templates/clear/vrrp/master/node.def
@@ -0,0 +1 @@
+help: Clear VRRP master
diff --git a/templates/clear/vrrp/process/node.def b/templates/clear/vrrp/process/node.def
index f97cb91..cea635b 100644
--- a/templates/clear/vrrp/process/node.def
+++ b/templates/clear/vrrp/process/node.def
@@ -1,6 +1,6 @@
help: Restart the VRRP process
run: if [ -e /etc/keepalived/keepalived.conf ] && [ -n "`grep vyatta /etc/keepalived/keepalived.conf `" ] ; then
- sudo /opt/vyatta/sbin/vyatta-keepalived.pl --vrrp-action clear
+ sudo /opt/vyatta/bin/sudo-users/vyatta-clear-vrrp.pl --vrrp-action clear_process
else
echo VRRP not configured
fi