Skip to content

docs(systemd): the firewall unit stops justifying WorkingDirectory with a dependency that is gone - #621

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/firewall-unit-workingdirectory-comment
Sep 22, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/firewall-unit-workingdirectory-comment

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 22, 2026

Copy link
Copy Markdown
Owner

What changed

The comment above [Unit] in systemd/homelab-backup-firewall.service. Nothing
else — one comment, no directives touched.

Why

It justified WorkingDirectory= with a dependency that d0e2556 removed:

WorkingDirectory= matters more here than anywhere else: backup-firewall.sh
resolves backups/firewall and .sops.yaml relative to the process's directory.

True when written. False since
#619 anchored both paths to the
script's own repository, which was the cause
#611 identified.

Nothing breaks either way — the directive is still set and still correct. What a
stale justification costs is the next reader, who is told the opposite of how the
script works, and who could reasonably undo the anchoring to make the code match
the comment. That would reintroduce #611's cause while looking like a tidy-up.

Replaced with the reason the siblings already give, quoted from
homelab-backup-volumes.service:29-30 — "Same directive everywhere so the five
units cannot disagree about where the repository is"
— so this unit stops
claiming a special case it no longer has.

Blast radius

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Comment only. systemd does not read comments, and no directive moved.

Verification

  • systemd-analyze verify systemd/homelab-backup-firewall.service — clean
  • make validate passes
  • Deployed — nothing to deploy

The installed copy under /etc/systemd/system carries the old text until the
next make install-timers. That is cosmetic drift in a comment, not a
behavioural difference, and nothing in validate compares installed units
against this directory — so it is not worth a password on its own.

Found while confirming #619 was live on the monitoring host: the nightly unit
runs from /home/robo/code/Gerrrt/HomeLab, that checkout is current, and the
self-test there is 31 PASS / 0 FAIL — so the fix is live and only its
explanation was stale.

Refs #611.

🤖 Generated with Claude Code

…th a dependency that is gone

The comment said backup-firewall.sh resolves backups/firewall and .sops.yaml
relative to the process's directory, and made WorkingDirectory= load-bearing
for this unit in a way it is not for its siblings. That was true when written
and stopped being true at d0e2556, which anchored both to the script's own
repository so a hand-run export lands where backup-offsite.sh reads it.

Nothing breaks either way — the directive is still set and still correct. What
a stale justification costs is the next reader, who is told the opposite of how
the script works and could reasonably undo the anchoring to match the comment.
Replaced with the siblings' reason: the same value everywhere keeps the five
units from disagreeing about where the repository is.

Comment only, so there is nothing to deploy. The installed copy under
/etc/systemd/system carries the old text until the next make install-timers,
and systemd does not read comments.

systemd-analyze verify passes; make validate passes.

Refs #611.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit 461bad5 into main Sep 22, 2026
3 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/firewall-unit-workingdirectory-comment branch September 22, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant