mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-22 10:01:03 +00:00
base-files: config_generate did not handle setups with more than 1 switch properly
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 43088
This commit is contained in:
parent
6149caf01e
commit
5a6433cc6c
@ -102,8 +102,6 @@ generate_switch() {
|
|||||||
json_select $key
|
json_select $key
|
||||||
json_get_vars enable reset blinkrate cpu_port
|
json_get_vars enable reset blinkrate cpu_port
|
||||||
|
|
||||||
[ -n "$cpu_port" ] || return
|
|
||||||
|
|
||||||
uci -q batch <<EOF
|
uci -q batch <<EOF
|
||||||
add network switch
|
add network switch
|
||||||
set network.@switch[-1].name='$key'
|
set network.@switch[-1].name='$key'
|
||||||
@ -111,9 +109,10 @@ set network.@switch[-1].reset='$reset'
|
|||||||
set network.@switch[-1].enable_vlan='$enable'
|
set network.@switch[-1].enable_vlan='$enable'
|
||||||
set network.@switch[-1].blinkrate='$blinkrate'
|
set network.@switch[-1].blinkrate='$blinkrate'
|
||||||
EOF
|
EOF
|
||||||
|
[ -n "$cpu_port" ] && {
|
||||||
json_get_keys vlans vlans
|
json_get_keys vlans vlans
|
||||||
for vlan in $vlans; do generate_switch_vlan $1 $vlan $cpu_port; done
|
for vlan in $vlans; do generate_switch_vlan $1 $vlan $cpu_port; done
|
||||||
|
}
|
||||||
json_select ..
|
json_select ..
|
||||||
json_select ..
|
json_select ..
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user