1 [ "$ACTION" == "add" ] || exit 0
3 PHYNBR=${DEVPATH##*/phy}
5 [ -n $PHYNBR ] || exit 0
8 . /lib/functions/system.sh
14 [ "$PHYNBR" = "0" ] && \
15 macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
16 > /sys${DEVPATH}/macaddress
19 if [ "$PHYNBR" = "0" ]; then
20 base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
21 macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
25 [ "$PHYNBR" = "1" ] && \
26 macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress
30 hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
31 [ "$PHYNBR" = "0" ] && \
32 macaddr_setbit_la "$(macaddr_add $hw_mac_addr 3)" > /sys${DEVPATH}/macaddress
33 [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
36 if [ "$PHYNBR" = "1" ]; then
37 hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
38 macaddr_setbit_la "$(macaddr_add $hw_mac_addr 3)" > /sys${DEVPATH}/macaddress
42 [ "$PHYNBR" = "1" ] && \
43 macaddr_setbit_la "$(mtd_get_mac_binary Factory 0x4)" > /sys${DEVPATH}/macaddress
52 hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
53 [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
54 [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
56 raisecom,msg1500-x-00)
57 [ "$PHYNBR" = "0" ] && \
58 macaddr_setbit_la "$(mtd_get_mac_ascii Config protest_lan_mac)" \
59 > /sys${DEVPATH}/macaddress
62 hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
63 [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress