diff --git a/docs/image-setup.sh b/docs/image-setup.sh index 34e8dec..be98250 100755 --- a/docs/image-setup.sh +++ b/docs/image-setup.sh @@ -184,13 +184,13 @@ ssh "df -h . && sudo resize2fs /dev/mmcblk0p2 && df -h ." # From raspi-config: https://github.com/RPi-Distro/raspi-config/blob/c0ddae8a2e99ecf15759c7cb8f0681cb0e7ce63a/raspi-config#L1141 # See also: https://github.com/futurice/chilipie-kiosk/issues/61#issuecomment-524622522 working "Enabling auto-login to CLI" -ssh "systemctl set-default multi-user.target" -ssh "ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service" -ssh "ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty2.service" -ssh "ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty3.service" -ssh "mkdir -p /etc/systemd/system/getty@tty1.service.d" -ssh "mkdir -p /etc/systemd/system/getty@tty2.service.d" -ssh "mkdir -p /etc/systemd/system/getty@tty3.service.d" +ssh "sudo systemctl set-default multi-user.target" +ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty1.service" +ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty2.service" +ssh "sudo ln -fs /lib/systemd/system/getty@.service /etc/systemd/system/getty.target.wants/getty@tty3.service" +ssh "sudo mkdir -p /etc/systemd/system/getty@tty1.service.d" +ssh "sudo mkdir -p /etc/systemd/system/getty@tty2.service.d" +ssh "sudo mkdir -p /etc/systemd/system/getty@tty3.service.d" ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty1.service.d/autologin.conf" ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty2.service.d/autologin.conf" ssh "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM\n' | sudo tee /etc/systemd/system/getty@tty3.service.d/autologin.conf"