summaryrefslogtreecommitdiff
path: root/templates/interfaces/ethernet
diff options
context:
space:
mode:
authorrbalocca <rbalocca@vyatta.com>2008-04-14 18:23:09 -0700
committerrbalocca <rbalocca@vyatta.com>2008-04-14 18:23:09 -0700
commit894a73759de66ea411824bbdaf99d07b8eeb2faf (patch)
tree67f6fda887ec5f881bbfdfe4b72f2422199a6ecc /templates/interfaces/ethernet
parent919ac0e4a35509f32fc6eaf6b0c5dac686b3b5db (diff)
parent4c42c6bde357423f0704a6e5b1ea70081944a1bb (diff)
downloadvyatta-cfg-system-894a73759de66ea411824bbdaf99d07b8eeb2faf.tar.gz
vyatta-cfg-system-894a73759de66ea411824bbdaf99d07b8eeb2faf.zip
Merge branch 'glendale' into hollywood
Conflicts: templates/interfaces/bridge/node.def templates/interfaces/ethernet/node.tag/bridge-group/node.def
Diffstat (limited to 'templates/interfaces/ethernet')
-rw-r--r--templates/interfaces/ethernet/node.tag/bridge-group/node.def35
1 files changed, 20 insertions, 15 deletions
diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
index 0ac61a19..0f4e9b2c 100644
--- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def
+++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def
@@ -1,15 +1,20 @@
-help: Set this interface to a bridge group
-commit:expression: $VAR(./bridge/) != ""; "Must set the bridge interface"
-create:expression: "sudo brctl addif $VAR(./bridge/@) $VAR(../@)"
-delete:expression: "touch /tmp/eth-$VAR(../@)-bridge.$PPID"
-end:expression: "\
- if [ -f \"/tmp/eth-$VAR(../@)-bridge.$PPID\" ]; then \
- rm -f /tmp/eth-$VAR(../@)-bridge.$PPID; \
- else \
- if [ -n \"$VAR(./cost/@)\" ]; then \
- sudo brctl setpathcost $VAR(./bridge/@) $VAR(../@) $VAR(./cost/@); \
- fi; \
- if [ -n \"$VAR(./priority/@)\" ]; then \
- sudo brctl setportprio $VAR(./bridge/@) $VAR(../@) $VAR(./priority/@); \
- fi; \
- fi; "
+help: Add this interface to a bridge group
+
+create: sudo brctl addif $VAR(./bridge/@) $VAR(../@);
+
+delete: touch /tmp/eth-$VAR(../@)-bridge.$PPID;
+
+end: if [ -f "/tmp/eth-$VAR(../@)-bridge.$PPID" ]; then
+ rm -f /tmp/eth-$VAR(../@)-bridge.$PPID;
+ else
+ if [ -z "$VAR(./bridge/@)" ]; then
+ echo "Must set the bridge interface";
+ exit 1;
+ fi;
+ if [ -n "$VAR(./cost/@)" ]; then
+ sudo brctl setpathcost $VAR(./bridge/@) $VAR(../@) $VAR(./cost/@);
+ fi;
+ if [ -n "$VAR(./priority/@)" ]; then
+ sudo brctl setportprio $VAR(./bridge/@) $VAR(../@) $VAR(./priority/@);
+ fi;
+ fi;