diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 16:48:50 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-02-08 16:48:50 -0800 |
commit | 0c3b485c06eb9131182e5d8cdc1735f5db2863f9 (patch) | |
tree | 29b862e3176502330f384dd77061ba8033aafa70 | |
parent | d4c5991186fd32cfdf8f590f2be46ea982afbfa8 (diff) | |
parent | b3afe02461764e16a0a4048494a1375991c00c29 (diff) | |
download | vyatta-cfg-0c3b485c06eb9131182e5d8cdc1735f5db2863f9.tar.gz vyatta-cfg-0c3b485c06eb9131182e5d8cdc1735f5db2863f9.zip |
Merge branch 'glendale' of git.vyatta.com:/git/vyatta-cfg into glendale
-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 |