summaryrefslogtreecommitdiff
path: root/mkosi.build
diff options
context:
space:
mode:
Diffstat (limited to 'mkosi.build')
-rwxr-xr-xmkosi.build9
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