summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 20:42:38 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-17 20:42:38 -0800
commit2e958dfd2787cb7a347213d6c665fd03ab976a63 (patch)
treedf9233894ff9b2c0e775ce1f24ed59a011a6a33b /templates/interfaces/ethernet
parente7de8b95b1ba4e50abaa62013e84baa98ecdefa4 (diff)
downloadvyatta-cfg-system-2e958dfd2787cb7a347213d6c665fd03ab976a63.tar.gz
vyatta-cfg-system-2e958dfd2787cb7a347213d6c665fd03ab976a63.zip
Cleanup bond-group syntax and commit checks
Move check for address and state of slave to commit which allows for better error message.
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def13
1 files changed, 5 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 cb339a42..3fe9ddbe 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -1,15 +1,12 @@
priority: 319
type: txt
help: Assign interface to bonding group
-commit:expression: exec \
- "${vyatta_sbindir}/vyatta-interfaces.pl --dev=$VAR(@) --check=bonding"
-
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show=bonding
+syntax:expression: pattern $VAR(@) "^bond[0-9]+$" \
+ ; "bond-group $VAR(@): not a valid name"
+
+commit:expression: exec "${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --check=$VAR(../@)"
-update: OLDG=`${vyatta_sbindir}/vyatta-cli-expand-var.pl \\$VAR\(/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=$VAR(@) --add=$VAR(../@)
+update: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --add=$VAR(../@)
delete: sudo ${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --remove=$VAR(../@)