From 734ae1bd178a778a909335cf8ac633d4b7c39f51 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 3 Dec 2015 21:12:51 +0000 Subject: base-files: uci-defaults-new.sh: fix for handling multiple ifnames Signed-off-by: Jo-Philipp Wich SVN-Revision: 47728 --- package/base-files/files/lib/functions/uci-defaults-new.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'package/base-files/files') 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 -- cgit v1.2.3