summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-18 12:17:57 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-11-18 13:09:48 -0800
commitd7eaacabf16cd8ec8d23e0d1c0f6471707e07c88 (patch)
tree165e7f8846076f642a4e04c970d15a6eb90040e2 /templates/interfaces
parent408b00b6b3caf284592f561fbf6bc5a04a163187 (diff)
downloadvyatta-cfg-quagga-d7eaacabf16cd8ec8d23e0d1c0f6471707e07c88.tar.gz
vyatta-cfg-quagga-d7eaacabf16cd8ec8d23e0d1c0f6471707e07c88.zip
Add syntax check for bridge interface name
Put in check for brN in bridge-group bridge. And make syntax error for bond-group better
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def3
2 files changed, 4 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
index 3fe9ddbe..dff97395 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -3,7 +3,7 @@ type: txt
help: Assign interface to bonding group
allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show=bonding
syntax:expression: pattern $VAR(@) "^bond[0-9]+$" \
- ; "bond-group $VAR(@): not a valid name"
+ ; "$VAR(@): not a valid name for a bonding interface"
commit:expression: exec "${vyatta_sbindir}/vyatta-bonding.pl --dev=$VAR(@) --check=$VAR(../@)"
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
index 930a5809..d58e8f07 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
@@ -2,6 +2,9 @@ type: txt
help: Bridge group name
+syntax:expression: pattern $VAR(@) "^br[0-9]+$" \
+ ; "$VAR(@): not a valid name for a bridge"
+
commit:expression: exec \
"/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"