From bc228673e0fca31daacfa83fb26a96cdcbe070a2 Mon Sep 17 00:00:00 2001 From: miro Date: Tue, 26 Nov 2024 20:27:17 +0000 Subject: [PATCH] :tada: --- autologin.conf | 3 +++ build_test.sh | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 autologin.conf 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..."