You are not logged in.
Pages: 1
Hello i have a question what is the parameters to set the autologin on getty tty on runit init system?
Offline
Edit /etc/inittab, here's the relevant section for my version in Alpine:
# Set up a couple of getty's
tty1::respawn:/sbin/agetty -a empty 38400 tty1
tty2::respawn:/sbin/getty 38400 tty2
tty3::respawn:/sbin/getty 38400 tty3
tty4::respawn:/sbin/getty 38400 tty4
tty5::respawn:/sbin/getty 38400 tty5
tty6::respawn:/sbin/getty 38400 tty6
^ So that runs agetty with the autologin option for my user on TTY1.
Obviously Devuan's file is different (I think it uses agetty by default) but the principle is the same.
Brianna Ghey — Rest In Power
Offline
I am running devuan chimaera and i dont have the "/etc/inittab" file i am using runit init system and i think its using getty by default.
Offline
Oops, sorry, my mistake.
The relevant file is at /etc/sv/getty-tty?/run. I think. Give me a minute to check...
EDIT: yup, that seems to work:
#!/bin/sh -euC
# Disable service, if /dev/tty{N} does not exist. See #914788.
if ! test -c /dev/tty1 ; then
rm /etc/service/getty-tty1
exit 0
fi
pgrep -x getty -t tty1 && exit 163
pgrep -x agetty -t tty1 && exit 163
! type fgetty >/dev/null 2>&1 || exec chpst -P fgetty tty1
exec chpst -P agetty -a empty 38400 tty1 linux
Replace empty with the actual username though, ofc.
Last edited by Head_on_a_Stick (2022-12-25 16:05:38)
Brianna Ghey — Rest In Power
Offline
Pages: 1