From eb4fb917fbe714f134cf304a0cb33670a75cf410 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 5 Jan 2024 10:57:16 -0500 Subject: [PATCH 1/2] systemd/ostree-boot-complete: Add `ConditionKernelCommandLine=ostree` In practice we don't enable this unit except via our generator, but let's do this on general principle. --- src/boot/ostree-boot-complete.service | 1 + 1 file changed, 1 insertion(+) diff --git a/src/boot/ostree-boot-complete.service b/src/boot/ostree-boot-complete.service index 5c09fdc9eb..d5b930a78e 100644 --- a/src/boot/ostree-boot-complete.service +++ b/src/boot/ostree-boot-complete.service @@ -16,6 +16,7 @@ [Unit] Description=OSTree Complete Boot Documentation=man:ostree(1) +ConditionKernelCommandLine=ostree # For now, this is the only condition on which we start, but it's # marked as a triggering condition in case in the future we want # to do something else. From 852db03843707d3ac80898a2d402f6d99603bcac Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 5 Jan 2024 10:58:57 -0500 Subject: [PATCH 2/2] systemd/ostree-boot-complete: Start earlier Prep for changing this service to perform state computations such as "is this boot the default, or did we get rolled back" that can be used by higher level tools. --- src/boot/ostree-boot-complete.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/boot/ostree-boot-complete.service b/src/boot/ostree-boot-complete.service index d5b930a78e..98ae3d181d 100644 --- a/src/boot/ostree-boot-complete.service +++ b/src/boot/ostree-boot-complete.service @@ -21,6 +21,9 @@ ConditionKernelCommandLine=ostree # marked as a triggering condition in case in the future we want # to do something else. ConditionPathExists=|/boot/ostree/finalize-failure.stamp +# We start early +DefaultDependencies=no +After=sysinit.target RequiresMountsFor=/boot # Ensure that we propagate the failure into the current boot before # any further finalization attempts.