meta-google: gbmc-bridge: Discover ULA addresses at runtime

If the bridge interface is assigned a MAC at runtime then it needs to
add the appropriate ULA address for that MAC.

Change-Id: Ia109c36320a78bb02ba9b54038ca23b0d3e2c948
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/networking/gbmc-bridge.bb b/meta-google/recipes-google/networking/gbmc-bridge.bb
index 1358ac5..202522a 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge.bb
+++ b/meta-google/recipes-google/networking/gbmc-bridge.bb
@@ -14,16 +14,20 @@
   file://+-bmc-gbmcbrusb.network \
   file://ipmi.service.in \
   file://50-gbmc-br.rules \
+  file://gbmc-br-ula.sh \
   "
 
 FILES_${PN}_append = " \
+  ${datadir}/gbmc-ip-monitor \
   ${systemd_unitdir}/network \
   ${sysconfdir}/nftables \
   ${sysconfdir}/avahi/services \
   "
 
 RDEPENDS_${PN}_append = " \
+  gbmc-ip-monitor \
   mstpd-mstpd \
+  network-sh \
   "
 
 GBMC_BR_MAC_ADDR ?= ""
@@ -72,4 +76,8 @@
   sed -i 's,@EXTRA_ATTRS@,,g' ${WORKDIR}/ipmi.service.in
   sed 's,@NAME@,bmc,g' ${WORKDIR}/ipmi.service.in >${avahi_dir}/bmc.ipmi.service
   sed 's,@NAME@,${MACHINE}-bmc,g' ${WORKDIR}/ipmi.service.in >${avahi_dir}/${MACHINE}-bmc.ipmi.service
+
+  mondir=${D}${datadir}/gbmc-ip-monitor
+  install -d -m0755 "$mondir"
+  install -m0644 ${WORKDIR}/gbmc-br-ula.sh "$mondir"/
 }