Files
agent-mkosi/mkosi.extra/usr/lib/systemd/system/agent-setup@.service
T
2026-11-15 15:52:10 +01:00

22 lines
642 B
Desktop File

# First boot: asks for the root password, hostname and ssh key, on the screen (tty1) and the serial
# console (ttyS0) at once; whichever is answered first stops the other.
[Unit]
Description=Agent first-boot setup on %I
ConditionPathExists=!/var/lib/agent/hostname
After=systemd-tmpfiles-setup.service
Before=getty@%i.service serial-getty@%i.service
[Service]
Type=oneshot
ExecStart=/usr/libexec/agent-setup
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
# Answering on one console stops the setup on the other (SIGTERM), which is no failure.
SuccessExitStatus=SIGTERM
[Install]
WantedBy=multi-user.target