diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2008-05-28 19:54:47 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2008-05-28 19:54:47 +0000 |
commit | fc1c8c877fa3f6e80480e002ee6492686c63c07b (patch) | |
tree | d1971697e738f42a2ed3c1c3d77fba60711cd93d /target/linux/ixp4xx/base-files | |
parent | e3b98243081fa163807437f0c71d433f05dd7ace (diff) | |
download | upstream-fc1c8c877fa3f6e80480e002ee6492686c63c07b.tar.gz upstream-fc1c8c877fa3f6e80480e002ee6492686c63c07b.tar.bz2 upstream-fc1c8c877fa3f6e80480e002ee6492686c63c07b.zip |
fix up mac address setting on ixp4xx for devices that store this info in the RedBoot config partition
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11285 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/base-files')
-rwxr-xr-x | target/linux/ixp4xx/base-files/etc/preinit.arch | 8 |
1 files changed, 8 insertions, 0 deletions
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 |