run-(agl-)postinst: Emit progress to console
authorJosé Bollo <jose.bollo@iot.bzh>
Tue, 13 Feb 2018 16:11:31 +0000 (17:11 +0100)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 13 Feb 2018 16:11:31 +0000 (17:11 +0100)
It can be useful to get the progression of the
postinstallation scripts.

Change-Id: I21f70ee1a5cae36c924a1c664855ba4179b5acd7
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
meta-agl/recipes-devtools/run-agl-postinsts/run-agl-postinsts/run-agl-postinsts.service
meta-agl/recipes-devtools/run-postinsts/run-postinsts_%.bbappend [new file with mode: 0644]

index 61d6d46..8f8667d 100644 (file)
@@ -7,6 +7,7 @@ ConditionPathExists=#SYSCONFDIR#/agl-postinsts
 
 [Service]
 Type=oneshot
+StandardOutput=journal+console
 ExecStart=#SBINDIR#/run-agl-postinsts
 ExecStartPost=#BASE_BINDIR#/systemctl disable run-agl-postinsts.service
 RemainAfterExit=No
diff --git a/meta-agl/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-agl/recipes-devtools/run-postinsts/run-postinsts_%.bbappend
new file mode 100644 (file)
index 0000000..fc327b6
--- /dev/null
@@ -0,0 +1,5 @@
+do_configure_append() {
+       if ! grep -q StandardOutput= ${WORKDIR}/run-postinsts.service; then
+               sed -i '/ExecStart=/iStandardOutput=journal+console' ${WORKDIR}/run-postinsts.service
+       fi
+}