diff --git a/autologin.conf b/autologin.conf new file mode 100644 index 0000000..27b7cee --- /dev/null +++ b/autologin.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/sbin/agetty --autologin %u --noclear %I 38400 linux \ No newline at end of file diff --git a/build_test.sh b/build_test.sh index 243c417..0c3ad99 100644 --- a/build_test.sh +++ b/build_test.sh @@ -50,6 +50,10 @@ echo "$HOSTNAME" > /etc/hostname # Update /etc/hosts to reflect the new hostname sed -i "s/127.0.1.1.*$/127.0.1.1\t$HOSTNAME/" /etc/hosts +echo "Enabling user auto-login ..." +mkdir -p /etc/systemd/system/getty@tty1.service.d +cp -v /mounted-github-repo/autologin.conf /etc/systemd/system/getty@tty1.service.d/autologin.conf +sed -i 's/%u/\$USER/g' /etc/systemd/system/getty@tty1.service.d/autologin.conf # Update package list and install necessary tools echo "Updating base system..."