diff options
Diffstat (limited to 'package/base-files/files/lib/functions/uci-defaults.sh')
-rw-r--r-- | package/base-files/files/lib/functions/uci-defaults.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 407a9c710f..02882f43ca 100644 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -39,7 +39,7 @@ ucidef_set_interface() { [ -n "$opt" -a -n "$val" ] || break - [ "$opt" = "ifname" -a "$val" != "${val/ //}" ] && { + [ "$opt" = "device" -a "$val" != "${val/ //}" ] && { json_select_array "ports" for e in $val; do json_add_string "" "$e"; done json_close_array @@ -79,11 +79,11 @@ ucidef_set_compat_version() { } ucidef_set_interface_lan() { - ucidef_set_interface "lan" ifname "$1" protocol "${2:-static}" + ucidef_set_interface "lan" device "$1" protocol "${2:-static}" } ucidef_set_interface_wan() { - ucidef_set_interface "wan" ifname "$1" protocol "${2:-dhcp}" + ucidef_set_interface "wan" device "$1" protocol "${2:-dhcp}" } ucidef_set_interfaces_lan_wan() { @@ -201,14 +201,14 @@ _ucidef_finish_switch_roles() { json_select_object "$role" # attach previous interfaces (for multi-switch devices) - json_get_var devices ifname + json_get_var devices device if ! list_contains devices "$device"; then devices="${devices:+$devices }$device" fi json_select .. json_select .. - ucidef_set_interface "$role" ifname "$devices" + ucidef_set_interface "$role" device "$devices" done } |