diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-12-08 19:31:25 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-12-10 10:25:43 +0100 |
commit | 24acd4064ebeca7ccdda12512ffdf8aefe600862 (patch) | |
tree | f48aacc1e489d60b531bbcdb527fb486154ad637 /mkosi.build | |
parent | 1f013e0c4962925fbd33a970ea26fd28532c37d0 (diff) | |
download | systemd-24acd4064ebeca7ccdda12512ffdf8aefe600862.tar.gz |
ci: check for failed services after boot
This should, hopefully, catch issues like systemd/systemd#21671
automagically.
Diffstat (limited to 'mkosi.build')
-rwxr-xr-x | mkosi.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mkosi.build b/mkosi.build index fe3688d6ae..5855868acc 100755 --- a/mkosi.build +++ b/mkosi.build @@ -110,3 +110,12 @@ if [ -n "$IMAGE_VERSION" ] ; then cat /tmp/os-release.tmp > "$DESTDIR"/usr/lib/os-release rm /tmp/os-release.tmp fi + +# If $CI_BUILD is set, copy over the CI service which executes a service check +# after boot and then shuts down the machine +if [ -n "$CI_BUILD" ]; then + mkdir -p "$DESTDIR/usr/lib/systemd/system" + cp -v "$SRCDIR/test/mkosi-check-and-shutdown.service" "$DESTDIR/usr/lib/systemd/system/mkosi-check-and-shutdown.service" + cp -v "$SRCDIR/test/mkosi-check-and-shutdown.sh" "$DESTDIR/usr/lib/systemd/mkosi-check-and-shutdown.sh" + chmod +x "$DESTDIR/usr/lib/systemd/mkosi-check-and-shutdown.sh" +fi |