1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 12:43:56 +02:00
openwrt/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
Mathias Kresin f12a32630f treewide: use the generic board_name function
Use the generic function instead ot the target specific ones.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2017-07-15 23:13:34 +02:00

16 lines
279 B
Bash

#!/bin/sh
preinit_set_mac_address() {
. /lib/functions.sh
case $(board_name) in
mr24|\
mx60)
mac_lan=$(mtd_get_mac_binary_ubi board-config 102)
[ -n "$mac_lan" ] && ifconfig eth0 hw ether "$mac_lan"
;;
esac
}
boot_hook_add preinit_main preinit_set_mac_address