| 6 |
6 |
|
# machine is a way to lose a disk. `alloy.installer` is set only by the
|
| 7 |
7 |
|
# GRUB entries in build/build-iso.sh, so this unit is inert everywhere else.
|
| 8 |
8 |
|
#
|
| 9 |
|
- |
# Conflicts with greetd because both want VT1. On the live medium there is
|
| 10 |
|
- |
# no account to log into yet, so the greeter has nothing to offer and would
|
| 11 |
|
- |
# only race the installer for the terminal.
|
|
9 |
+ |
# greetd and getty@tty1 have to be out of the way, because all three want
|
|
10 |
+ |
# VT1. On the live medium there is no account to log into yet, so the
|
|
11 |
+ |
# greeter has nothing to offer and would only race the installer for the
|
|
12 |
+ |
# terminal. They are stopped from ExecStartPre rather than declared in
|
|
13 |
+ |
# `Conflicts=`, and that is not a style choice:
|
|
14 |
+ |
#
|
|
15 |
+ |
# `Conflicts=` is applied when the start job is ENQUEUED, not when the unit
|
|
16 |
+ |
# activates. The condition above is checked later, when the job runs. So on
|
|
17 |
+ |
# an installed machine multi-user.target would pull this unit in, systemd
|
|
18 |
+ |
# would queue stop jobs for greetd and getty@tty1, and only then would the
|
|
19 |
+ |
# condition fail and skip the installer. The two units it displaced never
|
|
20 |
+ |
# start, nothing owns VT1, and the machine boots to a black screen with a
|
|
21 |
+ |
# cursor and no way to log in. That is what shipped: found 2026-07-21 by
|
|
22 |
+ |
# installing from the ISO in QEMU and booting the result, where the journal
|
|
23 |
+ |
# showed graphical.target reached, no failed units, and zero mentions of
|
|
24 |
+ |
# greetd anywhere. Masking this one unit brought tuigreet straight back.
|
|
25 |
+ |
#
|
|
26 |
+ |
# ExecStartPre runs only after the condition has passed, so an installed
|
|
27 |
+ |
# machine never touches either unit. The leading `-` keeps a stop of a unit
|
|
28 |
+ |
# that is not running from failing the install before it starts.
|
| 12 |
29 |
|
[Unit]
|
| 13 |
30 |
|
Description=Alloy installer
|
| 14 |
31 |
|
Documentation=https://git.sr.ht/~maxmj/alloy
|
| 15 |
32 |
|
ConditionKernelCommandLine=alloy.installer
|
| 16 |
33 |
|
After=systemd-user-sessions.service systemd-logind.service
|
| 17 |
34 |
|
Before=getty.target
|
| 18 |
|
- |
Conflicts=getty@tty1.service greetd.service
|
| 19 |
35 |
|
|
| 20 |
36 |
|
[Service]
|
|
37 |
+ |
ExecStartPre=-/usr/bin/systemctl stop getty@tty1.service greetd.service
|
| 21 |
38 |
|
# Type=idle so the boot's own console output has finished before a
|
| 22 |
39 |
|
# full-screen TUI takes the terminal; without it the first frame draws
|
| 23 |
40 |
|
# over service status lines and the user sees a torn screen.
|