install.sh: linger detection claims success it did not verify #927

Closed
opened 2026-10-27 13:38:19 +00:00 by sam · 0 comments
Owner

install.sh greps 'loginctl show-user $USER' for 'Linger=no'. When show-user fails or prints nothing -- no logind session, a container, USER unset -- the grep fails and control falls to the else branch, which prints '[OK] User linger is already enabled.' Nothing was verified and linger is never enabled, so systemd --user dies at logout. Worst for someone installing on a remote box over SSH: Archie works while they are connected and stops when they disconnect. Discussed 2026-07-30, fix agreed but not applied.

Acceptance Criteria

Detection tests for the positive (Linger=yes) and attempts enable-linger in every other case, including when show-user fails. Uses $(id -un) rather than $USER, which is unset in some container and cron contexts and would abort under set -u. enable-linger is idempotent so a redundant call is harmless. No branch claims linger is enabled without having observed it.


Imported from beads archie-core-1786637500254-399-aeb0e932 · GitHub #420 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08

install.sh greps 'loginctl show-user $USER' for 'Linger=no'. When show-user fails or prints nothing -- no logind session, a container, USER unset -- the grep fails and control falls to the else branch, which prints '[OK] User linger is already enabled.' Nothing was verified and linger is never enabled, so systemd --user dies at logout. Worst for someone installing on a remote box over SSH: Archie works while they are connected and stops when they disconnect. Discussed 2026-07-30, fix agreed but not applied. ### Acceptance Criteria Detection tests for the positive (Linger=yes) and attempts enable-linger in every other case, including when show-user fails. Uses $(id -un) rather than $USER, which is unset in some container and cron contexts and would abort under set -u. enable-linger is idempotent so a redundant call is harmless. No branch claims linger is enabled without having observed it. --- _Imported from beads `archie-core-1786637500254-399-aeb0e932` · GitHub #420 · type bug · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumbug labels 2026-10-27 13:38:19 +00:00
sam self-assigned this 2026-10-27 13:38:19 +00:00
sam closed this issue 2026-10-27 13:38:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#927