diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-11 12:57:49 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-11 12:57:49 -0500 |
| commit | 5b519001a73d98ac7c1ab49256ac34781994f9e0 (patch) | |
| tree | f26b1af65cd78ed4dae03a4220beeb834c6e4f9f /scripts/testing/lib/validation.sh | |
| parent | c0d83a4c75ae97d64b28f291c9f007c2bcb86d6e (diff) | |
| download | archsetup-5b519001a73d98ac7c1ab49256ac34781994f9e0.tar.gz archsetup-5b519001a73d98ac7c1ab49256ac34781994f9e0.zip | |
fix(testing): lingering check could never pass — ls output broke the capture
The check captured 'ls path && echo yes', so a present linger file produced 'path\nyes', which never string-equals yes — every run warned regardless of actual state. Forensics on a kept VM showed lingering correctly enabled all along (file present mid-install, loginctl Linger=yes, logind healthy): the original VM-artifact hypothesis was wrong, archsetup's enable-linger calls were always fine. test -e captures cleanly; verified returning 'yes' against the live VM.
Diffstat (limited to 'scripts/testing/lib/validation.sh')
| -rw-r--r-- | scripts/testing/lib/validation.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index f6e7fbf..91270ef 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -687,9 +687,12 @@ validate_all_services() { validate_service_optional "cups" "enabled" validate_service_optional "docker" "enabled" validate_service_optional "tailscaled" "enabled" - # Syncthing uses user service (not system), check lingering is enabled + # Syncthing uses user service (not system), check lingering is enabled. + # test -e, not ls: ls prints the path on success, so the old capture held + # "path\nyes" and could never equal "yes" — the check warned on every + # run, even with lingering correctly enabled. step "Checking user lingering for syncthing" - local linger_enabled=$(ssh_cmd "ls /var/lib/systemd/linger/cjennings 2>/dev/null && echo yes || echo no") + local linger_enabled=$(ssh_cmd "test -e /var/lib/systemd/linger/cjennings && echo yes || echo no") if [ "$linger_enabled" = "yes" ]; then validation_pass "User lingering enabled for syncthing user service" else |
