bare-metal: hostlogger: start hostlogger after bare metal config

Tested: make sure that bare-metal-setup runs before the hostlogger and
dependencies looks good

https://fusion2.corp.google.com/ci/guitar/projects/UNSPECIFIED/activity/227979c0-0603-4884-b477-4e7de5cce600/overview

Note: above fution link is from cherry pick. For release branch there is an ongoing issue that blocks all presubmits. We manually verified that nightly result looks good and all tests in presubmit passed.

Google-Bug-Id: 316190388
Change-Id: Ied3a0e37503b9292ffe0d4457559651245647e5e
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
(cherry picked from commit af7c071fad11ffe894a8b963b2fc2e9c2833df10)
diff --git a/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend b/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend
new file mode 100644
index 0000000..6e77d74
--- /dev/null
+++ b/recipes-phosphor/logging/phosphor-hostlogger_%.bbappend
@@ -0,0 +1,14 @@
+FILES:${PN}:append:gbmc = " \
+  ${systemd_system_unitdir}/hostlogger@.service.d/50-gbmc-override.conf \
+  "
+
+do_install:append:gbmc() {
+  install -d -m0755 ${D}${systemd_system_unitdir}/hostlogger@.service.d
+
+  # Echo directly, hostlogger bb file unfortunately treats all .conf file as a
+  # hostlogger conf file, so we cannot install the .conf directly.
+
+  echo "[Unit]
+After=bare-metal-setup.service
+" > ${D}${systemd_system_unitdir}/hostlogger@.service.d/50-gbmc-override.conf
+}