summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-17 17:19:49 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-17 17:19:49 -0800
commit44a2449730a5c379c96a486a8161daa8ebe2504f (patch)
treeab2097505a2e29af7de03cdb3cd08767f06df386 /templates/interfaces/ethernet
parenta9cd192305b779cb62aecd858ad9a4e5a1fbcad4 (diff)
parent36af5914de982f2770fba137c4beea9077cc6adb (diff)
downloadvyatta-cfg-quagga-44a2449730a5c379c96a486a8161daa8ebe2504f.tar.gz
vyatta-cfg-quagga-44a2449730a5c379c96a486a8161daa8ebe2504f.zip
Merge branch 'master' of http://phuket.vyatta.com/vyatta-cfg-system
Conflicts: debian/control
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def12
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def4
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def4
4 files changed, 22 insertions, 0 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
new file mode 100644
index 00000000..f6ca51e4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: "Add this interface to a bridge-group"
+syntax: exec " \
+ if [ -z \"`sudo brctl show | grep $(@) `\" ]; then \
+ echo bridge interface $(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+update: "sudo brctl addif $(@) $(../../@)"
+delete: "sudo brctl delif $(@) $(../../@)"
+#allowed: local -a array ;
+# array=( /sys/class/net/br* ) ;
+# echo -n ${array[@]##*/}
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def
new file mode 100644
index 00000000..1c2bbde1
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: "Set the path cost for this port"
+commit: $(../bridge/) != ""; "Must configure bridge interface"
+update: "sudo brctl setpathcost $(../../@) $(@)"
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
new file mode 100644
index 00000000..b76b5d71
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
@@ -0,0 +1,2 @@
+help: "Add this interface to a bridge group"
+commit: $(./bridge/) != ""; "Must set the bridge interface"
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def
new file mode 100644
index 00000000..d254b082
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def
@@ -0,0 +1,4 @@
+type: u32
+help: "Set the path priority for this port"
+commit: $(../bridge/) != ""; "Must configure bridge interface"
+update: "sudo brctl setportprio $(../../@) $(@)"