ostree-prepare-root.service: add OnFailureJobMode=isolate

This is stronger than the default (`replace`) because it tells systemd
to *stop everything* and go to `emergency.target`. In other codebases,
this has definitely helped me with the problem of "systemd keeps going
even after a failure".

Likely addresses #3219.

See also e.g. 3d2e165f97.
This commit is contained in:
Jonathan Lebon 2024-03-21 12:19:32 -04:00
parent dc4d4b5592
commit 05b3b66275
No known key found for this signature in database

View File

@ -19,11 +19,13 @@ Documentation=man:ostree(1)
DefaultDependencies=no
ConditionKernelCommandLine=ostree
ConditionPathExists=/etc/initrd-release
OnFailure=emergency.target
After=sysroot.mount
Requires=sysroot.mount
Before=initrd-root-fs.target
OnFailure=emergency.target
OnFailureJobMode=isolate
[Service]
Type=oneshot
ExecStart=/usr/lib/ostree/ostree-prepare-root /sysroot