Description=Check if any service failed and then shut down the machine
After=multi-user.target network-online.target
Requires=multi-user.target
-OnFailure=poweroff.target
-OnFailureJobMode=replace-irreversibly
+SuccessAction=exit
+FailureAction=exit
[Service]
Type=oneshot
-ExecStartPre=rm -f /failed-services /testok
ExecStart=/usr/lib/systemd/mkosi-check-and-shutdown.sh
-ExecStartPost=systemctl poweroff --no-block
if: matrix.format == 'disk' || matrix.format == 'directory'
run: sudo python3 -m mkosi boot
- - name: Check ${{ matrix.distro }}/${{ matrix.format }} systemd-nspawn
- if: matrix.format == 'disk' || matrix.format == 'directory'
- run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"
-
- name: Boot ${{ matrix.distro }}/${{ matrix.format }} UEFI
if: matrix.format == 'disk'
run: timeout -k 30 10m python3 -m mkosi qemu
-
- - name: Check ${{ matrix.distro }}/${{ matrix.format }} UEFI
- if: matrix.format == 'disk' || matrix.format == 'directory'
- run: sudo python3 -m mkosi shell bash -c "[[ -e /testok ]] || { cat /failed-services; exit 1; }"