Running ubuntu server, I've reconfigured /lib/systemd/system/[email protected] to
[Service]
# the VT is cleared by TTYVTDisallocate
# ##ADDED THIS HERE##
ExecStart=-/sbin/agetty -a diagnosticuser --noclear %I $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes
so that I could have my fancy little device automatically log in to a user whose shell is a diagnostic menu. The problem is that all the consoles automatically log in to that user now.
Is there a way to get just the first one to log in, and leave the rest with a regular log-in prompt? (can I have my cake as well as eat it?)
I was thinking, maybe I'd replace the "/sbin/agetty" with something that checks whether or not the "diagnosticuser" is already logged in. But I was a little confused by the hyphen in "-/sbin/agetty" and I didn't want to take my chances.