1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-13 18:53:52 +02:00
openwrt/target/linux/apm821xx/base-files/lib/preinit/05_set_iface_mac_apm821xx
Adrian Schmutzler 356866c481 target: replace remaining occurrences of ifconfig with ip
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>
2020-08-03 10:42:04 +02:00

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