aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
blob: ec078741c986efd00bcc7cf79de1bc97f8f971b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
. /lib/functions/system.sh

preinit_set_mac_address() {
	case $(board_name) in
	asus,tuf-ax4200)
		CI_UBIPART="UBI_DEV"
		addr=$(mtd_get_mac_binary_ubi "Factory" 0x4)
		ip link set dev eth0 address "$addr"
		ip link set dev eth1 address "$addr"
		;;
	esac
}

boot_hook_add preinit_main preinit_set_mac_address