diff options
Diffstat (limited to 'package/base-files/files/lib')
-rw-r--r-- | package/base-files/files/lib/functions/uci-defaults.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 134c527d8d..407a9c710f 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -39,7 +39,13 @@ ucidef_set_interface() { [ -n "$opt" -a -n "$val" ] || break - json_add_string "$opt" "$val" + [ "$opt" = "ifname" -a "$val" != "${val/ //}" ] && { + json_select_array "ports" + for e in $val; do json_add_string "" "$e"; done + json_close_array + } || { + json_add_string "$opt" "$val" + } done if ! json_is_a protocol string; then |