[ -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
}
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() {
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
}