Skip to content
Snippets Groups Projects
Commit 734ae1bd authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

base-files: uci-defaults-new.sh: fix for handling multiple ifnames


Signed-off-by: default avatarJo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47728
parent 82c49170
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment