Skip to content

Commit 6abd866

Browse files
say-paulcursoragent
andcommitted
fix: route boot-complete through greenboot-success.target
Healthcheck no longer directly triggers boot-complete.target. Instead: healthcheck passes -> OnSuccess activates greenboot-success.target -> success target Requires=boot-complete.target. This ensures boot-complete.target is only reached through the greenboot success chain, and greenboot-success.target has no [Install] section. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent bf1060a commit 6abd866

3 files changed

Lines changed: 3 additions & 10 deletions

File tree

greenboot-rs.spec

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,14 @@ install -DpZm 0644 usr/lib/systemd/system/greenboot-healthcheck.service.d/10-net
103103
%post -n %{pkgname}
104104
%systemd_post greenboot-healthcheck.service
105105
%systemd_post greenboot-set-rollback-trigger.service
106-
%systemd_post greenboot-success.target
107106

108107
%preun -n %{pkgname}
109108
%systemd_preun greenboot-healthcheck.service
110109
%systemd_preun greenboot-set-rollback-trigger.service
111-
%systemd_preun greenboot-success.target
112110

113111
%postun -n %{pkgname}
114112
%systemd_postun greenboot-healthcheck.service
115113
%systemd_postun greenboot-set-rollback-trigger.service
116-
%systemd_postun greenboot-success.target
117114

118115
%files -n %{pkgname}
119116
%license LICENSE LICENSE.dependencies
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
[Unit]
22
Description=Greenboot Health Checks Runner
33
Before=boot-complete.target
4+
OnSuccess=greenboot-success.target
45
OnFailureJobMode=fail
56
RequiresMountsFor=/boot
67
RequiresMountsFor=/etc
78
RefuseManualStart=yes
89

910
[Service]
1011
Type=oneshot
11-
RemainAfterExit=yes
12+
RemainAfterExit=no
1213
ExecStart=/usr/libexec/greenboot/greenboot health-check
1314
Restart=no
1415
PrivateMounts=yes
1516

1617
[Install]
17-
RequiredBy=boot-complete.target
1818
WantedBy=multi-user.target
19-
Also=greenboot-success.target greenboot-set-rollback-trigger.service
19+
Also=greenboot-set-rollback-trigger.service
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
[Unit]
22
Description=GreenBoot Healthcheck Success Target
3-
After=greenboot-healthcheck.service
43
Requires=boot-complete.target
5-
6-
[Install]
7-
WantedBy=multi-user.target

0 commit comments

Comments
 (0)