diff options
Diffstat (limited to 'package/base-files/files/lib/functions/uci-defaults-new.sh')
-rwxr-xr-x | package/base-files/files/lib/functions/uci-defaults-new.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults-new.sh b/package/base-files/files/lib/functions/uci-defaults-new.sh index f025cb696e..14c7f9294d 100755 --- a/package/base-files/files/lib/functions/uci-defaults-new.sh +++ b/package/base-files/files/lib/functions/uci-defaults-new.sh @@ -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 |