meta-google: gbmc-bridge: Terminate DHCP after reachable

We don't want to continue running DHCP after a machine is ready to serve
traffic. We will only run the DHCP process for a short amount of time if
we can determine that the BMC can reach network services because it was
already correctly configured.

Change-Id: Ie79e0582718af88a4a170b2a77beebfbadd5d0af
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 bc3b513..57f78ea 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge.bb
+++ b/meta-google/recipes-google/networking/gbmc-bridge.bb
@@ -22,6 +22,8 @@
   file://gbmc-br-nft.sh \
   file://gbmc-br-dhcp.sh \
   file://gbmc-br-dhcp.service \
+  file://gbmc-br-dhcp-term.sh \
+  file://gbmc-br-dhcp-term.service \
   "
 
 FILES:${PN}:append = " \
@@ -43,6 +45,7 @@
 SYSTEMD_SERVICE:${PN} += " \
   gbmc-br-ensure-ra.service \
   gbmc-br-dhcp.service \
+  gbmc-br-dhcp-term.service \
   "
 
 GBMC_BR_MAC_ADDR ?= ""
@@ -101,9 +104,11 @@
   install -d -m0755 ${D}${libexecdir}
   install -m0755 ${WORKDIR}/gbmc-br-ensure-ra.sh ${D}${libexecdir}/
   install -m0755 ${WORKDIR}/gbmc-br-dhcp.sh ${D}${libexecdir}/
+  install -m0755 ${WORKDIR}/gbmc-br-dhcp-term.sh ${D}${libexecdir}/
   install -d -m0755 ${D}${systemd_system_unitdir}
   install -m0644 ${WORKDIR}/gbmc-br-ensure-ra.service ${D}${systemd_system_unitdir}/
   install -m0644 ${WORKDIR}/gbmc-br-dhcp.service ${D}${systemd_system_unitdir}/
+  install -m0644 ${WORKDIR}/gbmc-br-dhcp-term.service ${D}${systemd_system_unitdir}/
 }
 
 do_rm_work:prepend() {