mctpd: Override the servicefile to include Restart

The MCTPd service should always be runnning as other
services rely on it for the MCTP control messages.

Tested: Manually
Fusion2: https://fusion2.corp.google.com/dacc4e40-b454-4408-b3c1-f9092f9b4067
Google-Bug-Id: 349474530
Change-Id: I807521dc76403a3c3809d9efdcd86a7cd176e470
Signed-off-by: Muhammad Usama <muhammadusama@google.com>
diff --git a/recipes-connectivity/mctp/mctp/service-override.conf b/recipes-connectivity/mctp/mctp/service-override.conf
new file mode 100644
index 0000000..8a764e3
--- /dev/null
+++ b/recipes-connectivity/mctp/mctp/service-override.conf
@@ -0,0 +1,2 @@
+[Service]
+Restart=always
diff --git a/recipes-connectivity/mctp/mctp_%.bbappend b/recipes-connectivity/mctp/mctp_%.bbappend
index e66c5cd..1c263d7 100644
--- a/recipes-connectivity/mctp/mctp_%.bbappend
+++ b/recipes-connectivity/mctp/mctp_%.bbappend
@@ -5,6 +5,7 @@
   file://0001-mctpd-Set-initial-route-MTU-to-minimum.patch \
   file://mctp-i2c.service \
   file://init-mctp-i2c-endpoint.sh \
+  file://service-override.conf \
 "
 
 RDEPENDS:${PN} += " \
@@ -19,6 +20,10 @@
 # This variable can be override by other layers
 EID_BASE ??= "60"
 
+FILES:${PN}:append:gbmc = " \
+  ${systemd_system_unitdir}/mctpd.service.d/service-override.conf \
+"
+
 do_install:append:gbmc() {
     # -i'' : Replace in-place without backup file
     sed -i'' -E ${WORKDIR}/init-mctp-i2c-endpoint.sh \
@@ -29,6 +34,10 @@
 
     install -d ${D}${systemd_system_unitdir}
     install -m 0644 ${WORKDIR}/mctp-i2c.service ${D}${systemd_system_unitdir}/
+
+    install -d ${D}${systemd_system_unitdir}/mctpd.service.d
+    install -D -m 0644 ${WORKDIR}/service-override.conf \
+      ${D}${systemd_system_unitdir}/mctpd.service.d/
 }