From ed61e202a1d7185374a33ebe86a3d8c1640e47b3 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Thu, 11 Dec 2014 18:28:44 +0000 Subject: au1000: distinguish different models and set correct MAC-address The target au1000 has at least 2 different models, the 'InternetBox' and the 'MeshCube' which look very similar from the kernel point of view but are totally different devices which base on the same design. Populating /tmp/sysinfo now. The 1st one has an issue which leads to a random mac-address after each boot which is corrected now via reading the bootloader-env. The real fix would be converting to DTS, this is only a workaround now. Signed-off-by: Bastian Bittorf SVN-Revision: 43626 --- .../linux/au1000/base-files/etc/uci-defaults/02_network | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 target/linux/au1000/base-files/etc/uci-defaults/02_network (limited to 'target/linux/au1000/base-files/etc') diff --git a/target/linux/au1000/base-files/etc/uci-defaults/02_network b/target/linux/au1000/base-files/etc/uci-defaults/02_network new file mode 100755 index 0000000..80bfb73 --- /dev/null +++ b/target/linux/au1000/base-files/etc/uci-defaults/02_network @@ -0,0 +1,17 @@ +#!/bin/sh + +. /lib/au1000.sh +. /lib/functions/system.sh +. /lib/functions/uci-defaults.sh +MAC= + +case "$(au1000_board_name)" in + 'internetbox') + MAC="$( au1000_yamonenv_getvar 'ethaddr' )" + MAC="$( macaddr_canonicalize "$MAC" )" + + [ -n "$MAC ] && ucidef_set_interface_macaddr lan "$MAC" + ;; +esac + +[ -z "$MAC" ] || uci commit network -- cgit v1.1