summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-31 21:59:46 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-08-04 16:21:57 -0700
commit5d0843438caaf374b7f8ad7496ecf26f7523ab70 (patch)
treedffc8af2d8bbdfddd20bb383f588b0ba4e7653ed /templates/interfaces
parent67ffa12de0848703b3b86d9c3b578a2edc79bc3b (diff)
downloadvyatta-cfg-quagga-5d0843438caaf374b7f8ad7496ecf26f7523ab70.tar.gz
vyatta-cfg-quagga-5d0843438caaf374b7f8ad7496ecf26f7523ab70.zip
BONDING: handle change of bond-group
Use similar action to new bridge-group Bug 4768
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def18
1 files changed, 7 insertions, 11 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
index d2a398a1..f65a9bde 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -3,14 +3,10 @@ help: Add this interface to a bonding group
commit:expression: exec \
"/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bonding"
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bonding
-end: ethif=$VAR(../@)
- old=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$ethif/bond-group/@\)`
- new=$VAR(@)
- if [ ${COMMIT_ACTION} = 'SET' ]; then
- sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --add=$ethif
- elif [ ${COMMIT_ACTION} = 'DELETE' ]; then
- sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --remove=$ethif
- elif [ "$old" != "$new" ]; then
- sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$old --remove=$ethif
- sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --add=$ethif
- fi
+update: eth=$VAR(../@); new=$VAR(@)
+ old=`/opt/vyatta/sbin/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$ethif/bond-group/@\)`
+ if [ -n "$old" ]; then
+ sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$old --remove=$ethif
+ fi
+ sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --add=$ethif
+delete: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --remove=$ethif