Skip to content

Commit ac27e42

Browse files
authored
Merge pull request #1009 from cgwalters/path-enabled
Two changes for `bootc-status-updated.path`
2 parents 38e6528 + 4efcf52 commit ac27e42

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ install:
2525
fi; \
2626
done
2727
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
28+
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
29+
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
2830
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
2931
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
3032
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree

systemd/bootc-status-updated.path

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[Unit]
22
Description=Monitor bootc for status changes
33
Documentation=man:bootc-status-updated.path(8)
4+
ConditionPathExists=/run/ostree-booted
45

56
[Path]
67
PathChanged=/ostree/bootc
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Verify our systemd units are enabled
2+
use std assert
3+
use tap.nu
4+
5+
tap begin "verify our systemd units"
6+
7+
let units = [
8+
["unit", "status"];
9+
# This one should be always enabled by our install logic
10+
["bootc-status-updated.path", "active"]
11+
]
12+
13+
for elt in $units {
14+
let found_status = systemctl show -P ActiveState $elt.unit | str trim
15+
assert equal $elt.status $found_status
16+
}
17+
18+
tap ok

0 commit comments

Comments
 (0)