Skip to content

Two changes for bootc-status-updated.path #1009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ install:
fi; \
done
install -D -m 0644 -t $(DESTDIR)/$(prefix)/lib/systemd/system systemd/*.service systemd/*.timer systemd/*.path systemd/*.target
install -d -m 0755 $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants
ln -s ../bootc-status-updated.path $(DESTDIR)/$(prefix)/lib/systemd/system/multi-user.target.wants/bootc-status-updated.path
install -D -m 0644 -t $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/usr/lib/ostree/ baseimage/base/usr/lib/ostree/prepare-root.conf
install -d -m 755 $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/sysroot
cp -PfT baseimage/base/ostree $(DESTDIR)/$(prefix)/share/doc/bootc/baseimage/base/ostree
Expand Down
1 change: 1 addition & 0 deletions systemd/bootc-status-updated.path
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[Unit]
Description=Monitor bootc for status changes
Documentation=man:bootc-status-updated.path(8)
ConditionPathExists=/run/ostree-booted

[Path]
PathChanged=/ostree/bootc
Expand Down
18 changes: 18 additions & 0 deletions tests/booted/readonly/012-unit-status.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Verify our systemd units are enabled
use std assert
use tap.nu

tap begin "verify our systemd units"

let units = [
["unit", "status"];
# This one should be always enabled by our install logic
["bootc-status-updated.path", "active"]
]

for elt in $units {
let found_status = systemctl show -P ActiveState $elt.unit | str trim
assert equal $elt.status $found_status
}

tap ok
Loading