openwrt/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac
Adrian Schmutzler 488da882f5 mpc85xx: tidy up 10-fix-wifi-mac
This applies some cosmetic style fixes, mostly by removing useless
echo commands.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-13 20:29:20 +02:00

25 lines
474 B
Bash

#!/bin/ash
[ "$ACTION" = "add" ] || exit 0
PHYNBR=${DEVPATH##*/phy}
[ -n "$PHYNBR" ] || exit 0
. /lib/functions.sh
. /lib/functions/system.sh
board=$(board_name)
case "$board" in
enterasys,ws-ap3710i)
mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress
;;
ocedo,panda)
mtd_get_mac_ascii uboot-env0 wmac$(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress
;;
sophos,red-15w-rev1)
mtd_get_mac_ascii u-boot-env ethaddr > /sys${DEVPATH}/macaddress
;;
esac