Blocking lightdm until wrolpi-bootstrap finishes — fixes first-boot zenity race.

wrolpi-bootstrap.service is `WantedBy=multi-user.target` and `Before=`
the wrolpi-api/app/kiwix/controller services, but had no ordering
constraint against lightdm.  Systemd was free to start lightdm in
parallel with bootstrap, so XFCE autologin would land before bootstrap
had written /tmp/wrolpi-firstboot-summary.txt — and the
wrolpi-firstboot-notify autostart would fire, find no summary, and
exit silently.

On the live test this manifested as the user seeing the desktop come
up immediately but never seeing the welcome zenity dialog.  The notify
script's own log confirmed the timing race:

  ===== Mon May 25 08:01:46 PM UTC 2026 invoked ... =====
  no summary file at /tmp/wrolpi-firstboot-summary.txt — nothing to do

bootstrap was still in the middle of `pg_createcluster` at 20:01:46
and didn't write the summary file until ~20:01:48.

Adding `Before=display-manager.service lightdm.service` makes systemd
wait for bootstrap to complete before bringing up the display manager.
Tested live by logging out + back in on the running ISO (re-firing
autostart with the summary already in place) — the zenity dialog
appeared.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Roland 2026-05-25 20:07:06 -06:00 • committed by lrnselfreliance
parent 677483a502
commit 662306a458

View file

@ -2,7 +2,11 @@
Description=WROLPi bootstrap (persistence partition + Postgres bind-mounts + DB)
Documentation=https://github.com/lrnselfreliance/wrolpi
After=local-fs.target systemd-tmpfiles-setup.service
Before=postgresql.service wrolpi-api.service wrolpi-app.service wrolpi-kiwix.service wrolpi-controller.service wrolpi-first-startup.service wrolpi-mounts.service wrolpi.target
# Block lightdm (and any other display manager) until bootstrap finishes.
# Otherwise XFCE autologin can land before bootstrap has written the
# first-boot summary file, and the wrolpi-firstboot-notify autostart
# fires too early and shows nothing.
Before=postgresql.service wrolpi-api.service wrolpi-app.service wrolpi-kiwix.service wrolpi-controller.service wrolpi-first-startup.service wrolpi-mounts.service wrolpi.target display-manager.service lightdm.service
Wants=local-fs.target
# live-boot uses one of these mount points depending on version; on
# Installed none of them exist and RequiresMountsFor resolves to the