From 7a29c2a85c29b7f945d2456871f42f92e3ea809f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 3 Aug 2009 11:58:58 -0700 Subject: Fix bonding group setup The last change broke bond-group setup. --- .../interfaces/ethernet/node.tag/bond-group/node.def | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'templates') 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(../@) -- cgit v1.2.3