From cb2c3fab969fcc8cf1ed913c6deca9754c7da146 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:22:04 +0100 Subject: [PATCH] Update install.func --- misc/install.func | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/misc/install.func b/misc/install.func index 8548d34fc..9ea4a0fab 100644 --- a/misc/install.func +++ b/misc/install.func @@ -274,24 +274,16 @@ customize() { # Create getty override for container-getty@1.service GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf" - mkdir -p "$(dirname "$GETTY_OVERRIDE")" - cat <<'EOF' >"$GETTY_OVERRIDE" + mkdir -p $(dirname $GETTY_OVERRIDE) + cat <$GETTY_OVERRIDE [Service] ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 linux +ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM EOF - # Create getty override for console-getty.service - CONSOLE_OVERRIDE="/etc/systemd/system/console-getty.service.d/override.conf" - mkdir -p "$(dirname "$CONSOLE_OVERRIDE")" - cat <<'EOF' >"$CONSOLE_OVERRIDE" -[Service] -ExecStart= -ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud console 115200,38400,9600 linux -EOF - - # Reload systemd daemon + # Reload and restart getty service $STD systemctl daemon-reload + $STD systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//') || true msg_ok "Autologin configured" fi