From bc1ad492102cabf1a8adba8bc215b5760e4cde3a Mon Sep 17 00:00:00 2001 From: Damien Date: Tue, 26 May 2026 17:48:34 +0200 Subject: [PATCH] Install script adds agetty for console autologin --- openbao/install.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/openbao/install.sh b/openbao/install.sh index af92848..03be345 100755 --- a/openbao/install.sh +++ b/openbao/install.sh @@ -475,11 +475,18 @@ EOF rc-service openbao start || log_warn "openbao failed to start — inspect /var/log/openbao.log" log_info "Enabling console auto-login on tty1..." - mkdir -p /etc/conf.d - cat > /etc/conf.d/agetty <<'EOF' -agetty_options="--autologin root --noclear" -EOF - sed -i 's|^tty1::respawn:/sbin/getty.*|tty1::respawn:/sbin/agetty --autologin root --noclear 38400 tty1|' /etc/inittab + # Alpine ships busybox getty by default; agetty (from util-linux) is what + # supports --autologin. + apk add --no-cache agetty >/dev/null 2>&1 || apk add --no-cache util-linux >/dev/null + + # Replace any existing tty1 entry, then append our autologin line. Doing it + # in two steps (delete + append) is more robust than an in-place sed against + # a pattern that may drift across Alpine releases. + sed -i '/^tty1::/d' /etc/inittab + echo 'tty1::respawn:/sbin/agetty --autologin root --noclear 38400 tty1' >> /etc/inittab + + # Tell PID 1 to re-read /etc/inittab so the change takes effect without a reboot. + kill -HUP 1 2>/dev/null || true configure_tailscale_proxy