mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2024-06-13 18:53:52 +02:00
ifconfig is effectively deprecated for quite some time now. Let's replace the remaining occurrences for our target setup by the corresponding ip commands now. Note that this does not touch ar71xx, as it will be dropped anyway, and changing it would only make backports harder. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
14 lines
285 B
Plaintext
14 lines
285 B
Plaintext
preinit_set_mac_address() {
|
|
. /lib/functions.sh
|
|
|
|
case $(board_name) in
|
|
meraki,mr24|\
|
|
meraki,mx60)
|
|
mac_lan=$(mtd_get_mac_binary_ubi board-config 0x66)
|
|
[ -n "$mac_lan" ] && ip link set eth0 address "$mac_lan"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
boot_hook_add preinit_main preinit_set_mac_address
|