You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
530 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)
echo $(mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR}) > /sys${DEVPATH}/macaddress
;;
ocedo,panda)
WMAC=wmac$(($PHYNBR + 1))
MAC=$(mtd_get_mac_ascii uboot-env0 ${WMAC})
echo ${MAC} > /sys${DEVPATH}/macaddress
;;
sophos,red-15w-rev1)
echo $(mtd_get_mac_ascii u-boot-env ethaddr) > /sys${DEVPATH}/macaddress
;;
*)
;;
esac