kirkwood: cleanup nsa310b mac address extraction
authorAlberto Bursi <alberto.bursi@outlook.it>
Mon, 6 Feb 2017 09:20:47 +0000 (10:20 +0100)
committerFelix Fietkau <nbd@nbd.name>
Sat, 11 Feb 2017 20:16:28 +0000 (21:16 +0100)
switch nsa310b mac address reading to mtd_get_mac_ascii helper as
it seems the fw_env.config file is created way later than when
network is set up, when I tested I still had that file included
in the image through /files folder.

Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
target/linux/kirkwood/base-files/etc/board.d/02_network

index 91b59b93bd4a94ebe4ce8fd4dd481477ad532da7..b5406b0e37069787d483429329a1f855e0baae19 100755 (executable)
@@ -32,7 +32,7 @@ case "$board" in
        ;;
 "nsa310b")
        ucidef_set_interface_lan "eth0" "dhcp"
-       ucidef_set_interface_macaddr "lan" $( fw_printenv ethaddr | awk -F"=" '{print $2}' )
+       ucidef_set_interface_macaddr "lan" $( mtd_get_mac_ascii uboot_env ethaddr )
        ;;
 *)
        ucidef_set_interface_lan "eth0"