meta-google: gbmc-bridge: return error when dhcp-done is running

If dhcp-done is running already we want a fresh start, so return error
to trigger a powercycle.

Change-Id: I146054adacb0ea62de54ec525915cecd27d3e85b
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
index d90b724..c6fddbb 100644
--- a/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
+++ b/meta-google/recipes-google/networking/gbmc-bridge/gbmc-start-dhcp.sh
@@ -13,6 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+systemctl stop gbmc-br-dhcp
+
+# in some cases dhcp-done might be run already, in this case we want
+# a powercycle for a clean install
+systemctl is-active -q dhcp-done@* && exit 1
+
 # stop dhcp term service to prevent race condition
 systemctl is-active --quiet gbmc-br-dhcp-term && systemctl stop gbmc-br-dhcp-term