Added autologin

master
B.J. Dweck 2020-09-01 19:36:31 +02:00
parent ff9a6a2f5d
commit bc2505a534
1 changed files with 15 additions and 0 deletions

15
stage2/05-autologin/00-run.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash -e
on_chroot << ENDCHROOT
systemctl set-default multi-user.target
ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin ${FIRST_USER_NAME} --noclear %I \\\$TERM
EOF
ENDCHROOT