From 527c4736742b1a6133808047b7d37e5b074bd307 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Sun, 11 Nov 2012 21:04:30 +0000 Subject: add support for the Tonze AP-422/425 SVN-Revision: 34165 --- .../linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'target/linux/ixp4xx/base-files/lib') diff --git a/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx index e19e0ec..e707dab 100644 --- a/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx +++ b/target/linux/ixp4xx/base-files/lib/preinit/05_set_ether_mac_ixp4xx @@ -17,6 +17,15 @@ set_ether_mac() { if [ "$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then ifconfig eth0 hw ether $(fconfig -s -r -d /dev/$RB_CONFIG -n zcom_npe_esa) fi + + # Others (*cough*, Tonze) are dumb enough to not handle mac addresses at all + + if [ "$(ifconfig eth0 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then + ifconfig eth0 hw ether 00:11:22:33:44:55 + fi + if [ "$(ifconfig eth1 2>/dev/null | grep -c 00:00:00:00:00:00)" == "1" ]; then + ifconfig eth1 hw ether 00:11:22:33:44:56 + fi } boot_hook_add preinit_main set_ether_mac -- cgit v1.1