summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
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(../@)