summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-07-04 21:30:56 +0300
committerLars Wirzenius <liw@liw.fi>2023-07-04 21:34:23 +0300
commitbe7929a3fb455343ea5545de42dbe7f2c2df1b2c (patch)
treea064716df1694d294638a0606ec37a2cd67b19d7
parenta2ee091cf6c701e2d2a81ecc1c10f93b9fe9d97c (diff)
downloadambient-ci-be7929a3fb455343ea5545de42dbe7f2c2df1b2c.tar.gz
fix: prevent getty on serial console
Previously, the build was still running while the system finished booting into multi-user mode. This isn't helpful. With this change, the unit must finish before booting continues - except it doesn't because the unit shuts down after finishing. Sponsored-by: author
-rw-r--r--ambient-build.service6
1 files changed, 4 insertions, 2 deletions
diff --git a/ambient-build.service b/ambient-build.service
index 8ea4592..2099835 100644
--- a/ambient-build.service
+++ b/ambient-build.service
@@ -1,10 +1,12 @@
[Unit]
Description=Run build job for Ambient CI
+Before=serial-getty@ttyS0.service
[Install]
-WantedBy=multi-user.target
+WantedBy=serial-getty@ttyS0.service
[Service]
Type=oneshot
+ExitType=cgroup
ExecStart=/bin/bash -c '/bin/ambient-run-script -t /dev/ttyS0 -s /dev/vdb -a /dev/vdc -c /dev/vdd -d /dev/vde >/dev/ttyS0 2>&1 || true'
-ExecStart=/sbin/poweroff
+ExecStartPost=/sbin/poweroff