diff options
Diffstat (limited to 'target/linux/ipq40xx/base-files/lib/preinit')
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh new file mode 100644 index 0000000000..1acd7366c8 --- /dev/null +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +. /lib/functions.sh + +preinit_set_mac_address() { + case $(board_name) in + meraki,mr33) + mac_lan=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 102) + [ -n "$mac_lan" ] && ip link set dev eth0 address "$mac_lan" + ;; + esac +} + +boot_hook_add preinit_main preinit_set_mac_address |