mvebu: fix ethX ordering on 385-db-ap and clearfog as well clearfog
authorJonas Gorski <[email protected]>
Thu, 16 Feb 2017 14:15:30 +0000 (15:15 +0100)
committerJonas Gorski <[email protected]>
Thu, 16 Feb 2017 14:19:00 +0000 (15:19 +0100)
Signed-off-by: Jonas Gorski <[email protected]>
target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac

index fca5ec85d1005baab4d6ec971db02ff7800521c0..ae34ef49da53f00c97d444179903cd2392c86325 100644 (file)
@@ -30,6 +30,17 @@ preinit_set_mac_address() {
                ifconfig eth1 hw ether $mac 2>/dev/null
                ifconfig eth0 hw ether $mac_wan 2>/dev/null
                ;;
+       armada-385-db-ap|armada-388-clearfog)
+               # rename interfaces back to the way they were with 4.4
+               case "$(readlink /sys/class/net/eth0)" in
+                       *f1070000*)
+                               ip link set eth0 name tmp0
+                               ip link set eth1 name eth0
+                               ip link set eth2 name eth1
+                               ip link set tmp0 name eth2
+                       ;;
+               esac
+               ;;
        esac
 }