summaryrefslogtreecommitdiff
path: root/templates/interfaces
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-04-01 15:49:33 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-04-01 15:49:33 -0700
commit1eda66500afdd019cf675bfa6acf99fc977e87d0 (patch)
tree641fa15916b084976ae54df5cd3663cd492d9814 /templates/interfaces
parentf36b1e7ef0d82286608d62595edeebf374e97f7b (diff)
downloadvyatta-cfg-quagga-1eda66500afdd019cf675bfa6acf99fc977e87d0.tar.gz
vyatta-cfg-quagga-1eda66500afdd019cf675bfa6acf99fc977e87d0.zip
Change "syntax" check to "commit" check for virtual interfaces.
Change to use script for allowed values.
Diffstat (limited to 'templates/interfaces')
-rw-r--r--templates/interfaces/bonding/node.tag/bridge-group/bridge/node.def11
-rw-r--r--templates/interfaces/ethernet/node.tag/bond-group/node.def2
2 files changed, 4 insertions, 9 deletions
diff --git a/templates/interfaces/bonding/node.tag/bridge-group/bridge/node.def b/templates/interfaces/bonding/node.tag/bridge-group/bridge/node.def
index 79609a86..dc958dd5 100644
--- a/templates/interfaces/bonding/node.tag/bridge-group/bridge/node.def
+++ b/templates/interfaces/bonding/node.tag/bridge-group/bridge/node.def
@@ -1,11 +1,6 @@
type: txt
help: Set this interface to a bridge-group
-syntax:expression: exec " \
- if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \
- echo bridge interface $VAR(@) doesn\\'t exist on this system ; \
- exit 1 ; \
- fi ; "
+commit:expression: exec \
+ "/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bridge"
delete: echo $VAR(@) > /tmp/bridge-no.$PPID
-allowed: local -a array ;
- array=( /sys/class/net/br* ) ;
- echo -n ${array[@]##*/}
+allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bridge
diff --git a/templates/interfaces/ethernet/node.tag/bond-group/node.def b/templates/interfaces/ethernet/node.tag/bond-group/node.def
index ea1b63eb..2109b5ac 100644
--- a/templates/interfaces/ethernet/node.tag/bond-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bond-group/node.def
@@ -1,6 +1,6 @@
type: txt
help: Add this interface to a bonding group
-syntax:expression: exec \
+commit:expression: exec \
"/opt/vyatta/sbin/vyatta-interfaces.pl --dev=$VAR(@) --check=bonding"
allowed: /opt/vyatta/sbin/vyatta-interfaces.pl --show=bonding
create: sudo ifenslave $VAR(@) $VAR(../@)