From ce3f17dafaeb8bb9ec4f163c7906c1863fc14eb7 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Wed, 28 May 2008 19:54:47 +0000 Subject: fix up mac address setting on ixp4xx for devices that store this info in the RedBoot config partition SVN-Revision: 11285 --- target/linux/ixp4xx/base-files/etc/preinit.arch | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 target/linux/ixp4xx/base-files/etc/preinit.arch (limited to 'target/linux/ixp4xx/base-files/etc') diff --git a/target/linux/ixp4xx/base-files/etc/preinit.arch b/target/linux/ixp4xx/base-files/etc/preinit.arch new file mode 100755 index 0000000000..1ee1d7404d --- /dev/null +++ b/target/linux/ixp4xx/base-files/etc/preinit.arch @@ -0,0 +1,8 @@ +RB_CONFIG="$(grep "RedBoot config" /proc/mtd | cut -d: -f1)" + +for npe in eth0 eth1 +do + if [ "$(ifconfig $npe 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then + ifconfig $npe hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n npe_"$npe"_esa) + fi +done -- cgit v1.2.3