You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
581 B
Bash

#!/bin/sh
. /lib/functions.sh
. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
mediatek_setup_interfaces()
{
local board="$1"
case $board in
bananapi,bpi-r2|\
unielec,u7623-02-emmc-512m)
ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan"
;;
esac
}
mediatek_setup_macs()
{
local board="$1"
case $board in
unielec,u7623-02-emmc-512m)
ucidef_set_interface_macaddr "wan" "$(cat /sys/class/net/wan/address)"
;;
esac
}
board_config_update
board=$(board_name)
mediatek_setup_interfaces $board
mediatek_setup_macs $board
board_config_flush
exit 0