Skip to content

Commit edcdf9c

Browse files
committed
systemd: enable bootc-status-updated.target on startup
Any services that react to status changes should be idempotent, and should run on boot. It is likely (but not guaranteed) that during boot we are in the process of switching from a previous deployment to a new one, and thus what was previously "staged" is now "booted" and what was previously "booted" is now "rollback", so anything that cares about status is going to want to handle that. Signed-off-by: John Eckersberg <[email protected]>
1 parent 2aed31d commit edcdf9c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ install:
2727
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
2828
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
2929
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
30+
ln -s ../bootc-status-updated.target $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.target
3031
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
3132
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
3233
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree

systemd/bootc-status-updated.target

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
Description=Target for bootc status changes
33
Documentation=man:bootc-status-updated.target(8)
44
StopWhenUnneeded=true
5+
ConditionPathExists=/run/ostree-booted
6+
7+
[Install]
8+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)