diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-02-01 18:37:07 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-02-01 18:37:07 -0800 |
commit | 7c31900bc1956b14ba77283c8db27a4aca35b238 (patch) | |
tree | 08c5684c0a8d5a8646e76ab017834545a71ff838 /templates/interfaces/ethernet | |
parent | 622bbf801bd435a3848c669ff2c0e9090cd2bb4e (diff) | |
download | vyatta-cfg-system-7c31900bc1956b14ba77283c8db27a4aca35b238.tar.gz vyatta-cfg-system-7c31900bc1956b14ba77283c8db27a4aca35b238.zip |
- Fix 2745: bridge-group cost - syntax error
- Fix 2746: bridge-group priority - syntax error
- Add comp_help strings
- Change bridge-group to a transaction node
Diffstat (limited to 'templates/interfaces/ethernet')
4 files changed, 20 insertions, 8 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 index 9a071930..c6d2934a 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/bridge/node.def @@ -1,11 +1,10 @@ type: txt help: Add this interface to a bridge-group -syntax:expression: exec " \ - if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \ +syntax:expression: exec " \ + if [ -z \"`sudo brctl show | grep $VAR(@) `\" ]; then \ echo bridge interface $VAR(@) doesn\\'t exist on this system ; \ - exit 1 ; \ + exit 1 ; \ fi ; " -update:expression: "sudo brctl addif $VAR(@) $VAR(../../@)" delete:expression: "sudo brctl delif $VAR(@) $VAR(../../@)" allowed: local -a array ; array=( /sys/class/net/br* ) ; diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def index f3ae520f..ef2d9940 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/cost/node.def @@ -1,4 +1,4 @@ type: u32 help: Set the path cost for this port -commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" -update:expression: "sudo brctl setpathcost $VAR(../../@) $VAR(@)" +comp_help: possible completions: + <0-2147483647> Set port cost diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/node.def index fd392431..3cc92cd0 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/node.def @@ -1,2 +1,15 @@ help: Add 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; " diff --git a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def index 12200b72..8688c394 100644 --- a/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def +++ b/templates/interfaces/ethernet/node.tag/bridge-group/priority/node.def @@ -1,4 +1,4 @@ type: u32 help: Set the path priority for this port -commit:expression: $VAR(../bridge/) != ""; "Must configure bridge interface" -update:expression: "sudo brctl setportprio $VAR(../../@) $VAR(@)" +comp_help: possible completions: + <0-255> Set port priority |