aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-12-03 21:12:51 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-12-03 21:12:51 +0000
commit734ae1bd178a778a909335cf8ac633d4b7c39f51 (patch)
treea9e273f68f22ce9f85efb5d53404c3cf52cca6da /package/base-files/files
parent82c491708bcf16510d20a4dccc144a319386d6a1 (diff)
downloadupstream-734ae1bd178a778a909335cf8ac633d4b7c39f51.tar.gz
upstream-734ae1bd178a778a909335cf8ac633d4b7c39f51.tar.bz2
upstream-734ae1bd178a778a909335cf8ac633d4b7c39f51.zip
base-files: uci-defaults-new.sh: fix for handling multiple ifnames
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 47728
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/lib/functions/uci-defaults-new.sh8
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