bare-metal: ensure client start after bm config
Add a dependency to ensure that bm override always happens before the
client startup.
Google-Bug-Id: 232191934
Change-Id: I85cc50fd1d7987a43ca253a2baee6a3b144e519d
Signed-off-by: Yuxiao Zhang <yuxiaozhang@google.com>
diff --git a/recipes-phosphor/console/obmc-console/40-console-client-override.conf b/recipes-phosphor/console/obmc-console/40-console-client-override.conf
new file mode 100644
index 0000000..b3005d5
--- /dev/null
+++ b/recipes-phosphor/console/obmc-console/40-console-client-override.conf
@@ -0,0 +1,2 @@
+[Unit]
+After=bare-metal-setup.service
diff --git a/recipes-phosphor/console/obmc-console_%.bbappend b/recipes-phosphor/console/obmc-console_%.bbappend
index 466c81b..a5125e1 100644
--- a/recipes-phosphor/console/obmc-console_%.bbappend
+++ b/recipes-phosphor/console/obmc-console_%.bbappend
@@ -2,8 +2,17 @@
SRC_URI:append:gbmc = " \
file://readonly-obmc-console-client \
+ file://40-console-client-override.conf \
"
do_install:append:gbmc() {
+ install -d -m0644 ${D}${systemd_system_unitdir}/serial-to-host@.service.d/
+ install -m0644 ${WORKDIR}/40-console-client-override.conf \
+ ${D}${systemd_system_unitdir}/serial-to-host@.service.d/
+
+ install -d -m0644 ${D}${systemd_system_unitdir}/serial-to-bmc@.service.d/
+ install -m0644 ${WORKDIR}/40-console-client-override.conf \
+ ${D}${systemd_system_unitdir}/serial-to-bmc@.service.d/
+
install -d -m0755 ${D}${libexecdir}
install -m0755 ${WORKDIR}/readonly-obmc-console-client ${D}${libexecdir}/
}