From 8de2c8ca88932368fb7c3a90b92f26aab372f9a5 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 7 May 2025 09:53:41 +0200 Subject: [PATCH] Update alpine-install.func --- misc/alpine-install.func | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/misc/alpine-install.func b/misc/alpine-install.func index 1413e97..69f540d 100644 --- a/misc/alpine-install.func +++ b/misc/alpine-install.func @@ -214,12 +214,21 @@ customize() { passwd -d root >/dev/null 2>&1 # Ensure agetty is available - apk add --no-cache --force-broken-world util-linux-getty >/dev/null 2>&1 + apk add --no-cache --force-broken-world util-linux >/dev/null 2>&1 - # Enable autologin on tty1 - sed -i 's|^tty1::respawn:.*|tty1::respawn:/sbin/agetty --autologin root --noclear tty1 38400 linux|' /etc/inittab - touch /run/openrc/softlevel - kill -HUP 1 + # Create persistent autologin boot script + mkdir -p /etc/local.d + cat <<'EOF' >/etc/local.d/autologin.start +#!/bin/sh +sed -i 's|^tty1::respawn:.*|tty1::respawn:/sbin/agetty --autologin root --noclear tty1 38400 linux|' /etc/inittab +kill -HUP 1 +EOF + + chmod +x /etc/local.d/autologin.start + rc-update add local >/dev/null 2>&1 + + # Apply autologin immediately for current session + /etc/local.d/autologin.start msg_ok "Customized Container" fi