Add two MAC addresses support for Mihawk's 2 NICs

(From meta-openpower rev: 94da1d8dee685dbfb062f457597265289d369295)

Change-Id: I0df0ad8b66d8dfc7774bf3af73a08eed26a6d497
Signed-off-by: Alvin Wang <alvinwang@msn.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
index 9668ed5..cf03b82 100755
--- a/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
+++ b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac.sh
@@ -15,13 +15,34 @@
     INVENTORY_PATH='/xyz/openbmc_project/inventory'
     NETWORK_ITEM_IFACE='xyz.openbmc_project.Inventory.Item.NetworkInterface'
 
-    NETWORK_ITEM_PATH=$(busctl --no-pager --verbose call \
+    # Get the NETWORK ITEM count
+    NETWORK_ITEM_PATH_COUNT=$(busctl --no-pager --verbose call \
+                            ${MAPPER_IFACE} \
+                            ${MAPPER_PATH} \
+                            ${MAPPER_IFACE} \
+                            GetSubTree sias \
+                            ${INVENTORY_PATH} 0 1 ${NETWORK_ITEM_IFACE} \
+                        2>/dev/null | grep ${INVENTORY_PATH} | wc -l || true)
+
+    if [ $NETWORK_ITEM_PATH_COUNT -gt 1 ]; then
+        # If there are more than 2 NETOWRK ITEM and path must contain $1
+        # for finding the right NETWORK ITEM
+        NETWORK_ITEM_PATH=$(busctl --no-pager --verbose call \
+                            ${MAPPER_IFACE} \
+                            ${MAPPER_PATH} \
+                            ${MAPPER_IFACE} \
+                            GetSubTree sias \
+                            ${INVENTORY_PATH} 0 1 ${NETWORK_ITEM_IFACE} \
+                        2>/dev/null | grep ${INVENTORY_PATH} | grep $1 || true)
+    else
+        NETWORK_ITEM_PATH=$(busctl --no-pager --verbose call \
                             ${MAPPER_IFACE} \
                             ${MAPPER_PATH} \
                             ${MAPPER_IFACE} \
                             GetSubTree sias \
                             ${INVENTORY_PATH} 0 1 ${NETWORK_ITEM_IFACE} \
                         2>/dev/null | grep ${INVENTORY_PATH} || true)
+    fi
 
     # '     STRING "/xyz/openbmc_project/inventory/system/chassis/ethernet";'
     NETWORK_ITEM_PATH=${NETWORK_ITEM_PATH#*\"}