base-files: uci-defaults-new.sh: fix for handling multiple ifnames
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47728
This commit is contained in:
parent
82c491708b
commit
734ae1bd17
@ -166,11 +166,11 @@ _ucidef_finish_switch_roles() {
|
||||
json_select_object network
|
||||
json_select_object "$role"
|
||||
# attach previous interfaces (for multi-switch devices)
|
||||
local prev_device; json_get_var prev_device ifname
|
||||
if ! list_contains prev_device "$device"; then
|
||||
device="${prev_device:+$prev_device }$device"
|
||||
local devices; json_get_var devices ifname
|
||||
if ! list_contains devices "$device"; then
|
||||
devices="${devices:+$devices }$device"
|
||||
fi
|
||||
json_add_string ifname "$device"
|
||||
json_add_string ifname "$devices"
|
||||
json_select ..
|
||||
json_select ..
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user