Enable configured console systemd services listed in
TARGET_BOOTSTRAPPER_TTY_SERVICES during post-installation.
This ensures custom consoles (e.g. serial-getty@ttyACM0) are enabled at
image build time so the installer is launched on them at first boot.
Signed-off-by: Badrikesh Prusty <
badrikes...@siemens.com>
---
.../target-bootstrapper-service/files/postinst.tmpl | 7 +++++++
.../
target-bootstrapper-service.bb | 4 ++++
2 files changed, 11 insertions(+)
create mode 100644 meta-isar/recipes-installer/target-bootstrapper-service/files/postinst.tmpl
diff --git a/meta-isar/recipes-installer/target-bootstrapper-service/files/postinst.tmpl b/meta-isar/recipes-installer/target-bootstrapper-service/files/postinst.tmpl
new file mode 100644
index 00000000..7c24af17
--- /dev/null
+++ b/meta-isar/recipes-installer/target-bootstrapper-service/files/postinst.tmpl
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+for tty_service in ${TARGET_BOOTSTRAPPER_TTY_SERVICES}; do
+ deb-systemd-helper enable ${tty_service} || true
+done
diff --git a/meta-isar/recipes-installer/target-bootstrapper-service/
target-bootstrapper-service.bb b/meta-isar/recipes-installer/target-bootstrapper-service/
target-bootstrapper-service.bb
index c3441494..3668d946 100644
--- a/meta-isar/recipes-installer/target-bootstrapper-service/
target-bootstrapper-service.bb
+++ b/meta-isar/recipes-installer/target-bootstrapper-service/
target-bootstrapper-service.bb
@@ -22,9 +22,13 @@ python(){
inherit dpkg-raw
SRC_URI = "\
+ file://postinst.tmpl \
file://target-bootstrapper.override.conf \
"
+TEMPLATE_FILES = "postinst.tmpl"
+TEMPLATE_VARS = "TARGET_BOOTSTRAPPER_TTY_SERVICES"
+
DEPENDS += " target-bootstrapper"
DEBIAN_DEPENDS = "target-bootstrapper"
--
2.47.3