mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 19:25:21 +02:00
orion: add wrt350nv2 mac address fix from r21647
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21648 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
8eca131c0f
commit
c83296630b
@ -28,6 +28,23 @@ set system.wifi_led.mode='link tx rx'
|
||||
set system.wifi_led.default='0'
|
||||
commit system
|
||||
__EOF
|
||||
|
||||
# add mac address from U-Boot partition to lan and wan devices
|
||||
MTD=`grep -e 'u-boot' /proc/mtd`
|
||||
MTD=`echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/'`
|
||||
[ -n "${MTD}" ] && {
|
||||
MACADDR=`dd if=/dev/mtdblock${MTD} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"'`
|
||||
MACADDR2=$(( 0x${MACADDR} + 1))
|
||||
MACADDR2=`printf "%012x" ${MACADDR2}`
|
||||
|
||||
MACADDR=`echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
|
||||
MACADDR2=`echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
|
||||
|
||||
uci set network.eth0.macaddr=${MACADDR}
|
||||
uci set network.lan.macaddr=${MACADDR}
|
||||
uci set network.wan.macaddr=${MACADDR2}
|
||||
uci commit network
|
||||
}
|
||||
}
|
||||
|
||||
case "${hardware}" in
|
||||
|
Loading…
Reference in New Issue
Block a user