Fix TTY login to match desktop autologin

This commit is contained in:
Simon Long 2018-11-17 19:04:30 +00:00
parent 985548d7ca
commit b0d6b64682

View File

@ -972,6 +972,7 @@ do_boot_behaviour() {
if [ -e /etc/init.d/lightdm ]; then
systemctl set-default graphical.target
ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
sed /etc/systemd/system/autologin@.service -i -e "s#^ExecStart=-/sbin/agetty --autologin [^[:space:]]*#ExecStart=-/sbin/agetty --autologin $SUDO_USER#"
sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=$SUDO_USER/"
disable_raspi_config_at_boot
else