3 . /lib/functions/uci-defaults.sh
4 . /lib/functions/system.sh
8 json_add_string "budget" "$1"
9 json_select_array ports
11 json_add_string "" "$port"
20 lan_list=$(ls -1 -v -d /sys/class/net/lan* | xargs -n1 basename | xargs)
21 ucidef_set_bridge_device switch
22 ucidef_set_interface_lan "$lan_list"
29 lan_mac=$(mtd_get_mac_ascii u-boot-env2 mac_start)
30 lan_mac_end=$(mtd_get_mac_ascii u-boot-env2 mac_end)
31 label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
32 [ -z "$lan_mac" ] && lan_mac=$label_mac
36 ucidef_set_interface_macaddr "lan" $lan_mac
37 ucidef_set_bridge_mac "$lan_mac"
38 ucidef_set_network_device_mac eth0 $lan_mac
39 for lan in $lan_list; do
40 ucidef_set_network_device_mac $lan $lan_mac
41 [ -z "$lan_mac_end" ] || [ "$lan_mac" == "$lan_mac_end" ] && lan_mac=$(macaddr_setbit_la $lan_mac)
42 lan_mac=$(macaddr_add $lan_mac 1)
44 [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
48 ucidef_set_poe 130 "$lan_list"
51 ucidef_set_poe 55 "$lan_list"
54 ucidef_set_poe 77 "$lan_list"
58 ucidef_set_poe 70 "$lan_list"
61 ucidef_set_poe 170 "$lan_list"