diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2008-02-08 16:42:54 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2008-02-08 16:42:54 -0800 |
commit | b3afe02461764e16a0a4048494a1375991c00c29 (patch) | |
tree | a9cf2b053d09744927e4cabdf932e1a803bf9372 /templates | |
parent | e62a2cf723b0a0830e066468c7a7cac4d3445136 (diff) | |
download | vyatta-cfg-b3afe02461764e16a0a4048494a1375991c00c29.tar.gz vyatta-cfg-b3afe02461764e16a0a4048494a1375991c00c29.zip |
- Change vlan range to 0-4094 to match linux
- Change ethernet completion
Diffstat (limited to 'templates')
-rw-r--r-- | templates/interfaces/ethernet/node.def | 10 | ||||
-rw-r--r-- | templates/interfaces/ethernet/node.tag/vif/node.def | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/templates/interfaces/ethernet/node.def b/templates/interfaces/ethernet/node.def index b42e488..eee64cd 100644 --- a/templates/interfaces/ethernet/node.def +++ b/templates/interfaces/ethernet/node.def @@ -10,6 +10,10 @@ update:expression: "sudo ip link set $VAR(@) up" ; "Error enabling dev $VAR(@)" update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(@)\" \ -c \"link-detect\"; " delete:expression: "sudo ip link set $VAR(@) down" ; "Error disabling dev $VAR(@)" -allowed: local -a array ; - array=( /sys/class/net/{eth,vmnet}[0-9]+[^.] ) ; - echo -n ${array[@]##*/} +allowed: for dev in /sys/class/net/*; + do if [[ -L $dev/device ]] + then if [[ $(cat $dev/type) -eq 1 ]] + then echo -n ${dev##*/} " " + fi + fi + done diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index e8145b1..73958be 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -1,12 +1,13 @@ tag: type: u32 help: VLAN ID -syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4095; "VLAN ID must be between 0 and 4095" +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" create:expression: "sudo modprobe 8021q"; "Error loading 802.1q driver" create:expression: "sudo vconfig add $VAR(../@) $VAR(@)"; "Error adding VLAN id $VAR(@) to dev $VAR(../@)" create:expression: "sudo ip link set $VAR(../@).$VAR(@) up"; "Error enabling VLAN id $VAR(@) on dev $VAR(../@)" -update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\" -c \"interface $VAR(../@).$VAR(@)\" \ +update:expression: "${vyatta_sbindir}/vyatta-vtysh.pl -c \"configure terminal\"\ + -c \"interface $VAR(../@).$VAR(@)\" \ -c \"link-detect\"; " delete:expression: "sudo vconfig rem $VAR(../@).$VAR(@)"; "Error removing VLAN id $VAR(@) from dev $VAR(../@)" comp_help: possible completions: - <0-4095> Set VLAN ID + <0-4094> Set VLAN ID |