summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-08-03 11:58:58 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-08-03 11:58:58 -0700
commite51d9e3d161001210785fc6571076935a3b23734 (patch)
treee1124dc0806a301445cec7ef3575d52025121ed4
parent2c78741cb2adce4c11bbdd8d25a966c3301dcbe0 (diff)
downloadvyatta-cfg-system-e51d9e3d161001210785fc6571076935a3b23734.tar.gz
vyatta-cfg-system-e51d9e3d161001210785fc6571076935a3b23734.zip
Fix bonding group setup
The last change broke bond-group setup.
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def18
1 files changed, 10 insertions, 8 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
index f65a9bde..b29901a8 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -1,12 +1,14 @@
type: txt
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
-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
+ "${vyatta_sbindir}/vyatta-interfaces.pl --dev=$VAR(@) --check=bonding"
+
+allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show=bonding
+
+update: OLDG=`${vyatta_sbindir}/vyatta-cli-expand-var.pl \$\(/interfaces/ethernet/$VAR(../@)/bond-group/@\)`
+ if [ -n "$OLDG" ]; then
+ sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$OLDG --remove=$VAR(../@)
fi
- sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --add=$ethif
-delete: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$new --remove=$ethif
+ sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --add=$VAR(../@)
+
+delete: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --remove=$VAR(../@)