Skip to content

Commit 7399044

Browse files
committed
Add bootc-status-updated-onboot.target
The bootc-status-updated.target unit cannot directly be WantedBy=multi-user.target, because we rely on StopWhenUnneeded=true so the target will be activated each time bootc-status-updated.path triggers it. Because multi-user.target remains active, this would hold bootc-status-updated.target in an active state as well, and the path unit activating would not have the desired effect of retriggering the target unit. The new bootc-status-updated-onboot.target is intended to serve the same purpose as bootc-status-updated.target but will activate (and remain active) on boot. Any interested units should be WantedBy both targets. This updates bootc-publish-rhsm-facts.service to do just that. Signed-off-by: John Eckersberg <[email protected]>
1 parent 2f90eff commit 7399044

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +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
30+
ln -s ../bootc-status-updated-onboot.target $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated-onboot.target
3131
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
3232
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
3333
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree

systemd/bootc-publish-rhsm-facts.service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ ExecStart=/usr/bin/bootc internals publish-rhsm-facts
99

1010
[Install]
1111
WantedBy=bootc-status-updated.target
12+
WantedBy=bootc-status-updated-onboot.target
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[Unit]
2+
Description=Target for bootc status changes on boot
3+
Documentation=man:bootc-status-updated.target(8)
4+
ConditionPathExists=/run/ostree-booted
5+
6+
[Install]
7+
WantedBy=multi-user.target

systemd/bootc-status-updated.target

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

0 commit comments

Comments
 (0)