From 4cb36b7807b489837960fcbefd5cd73d08e74aed Mon Sep 17 00:00:00 2001 From: d4nn13 Date: Sun, 19 Apr 2026 19:45:13 +0200 Subject: [PATCH] mkdir /usr/local/sbin before writing autologin wrapper Alpine's base image doesn't create /usr/local/sbin, so the heredoc failed with "can't create /usr/local/sbin/autologin-root: nonexistent directory" on fresh containers. Co-Authored-By: Claude Opus 4.7 --- proxmox/create-lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox/create-lxc.sh b/proxmox/create-lxc.sh index 9adc274..bacc9f7 100755 --- a/proxmox/create-lxc.sh +++ b/proxmox/create-lxc.sh @@ -161,7 +161,7 @@ pct exec "$VMID" -- sh -c "curl -fsSL '$BOOTSTRAP_URL' \ # is unchanged in practice — anyone who can open the web console already has # `pct enter` on the host. log "enabling tty1 auto-login" -pct exec "$VMID" -- sh -c 'cat > /usr/local/sbin/autologin-root && chmod 0755 /usr/local/sbin/autologin-root' <<'AUTOLOGIN' +pct exec "$VMID" -- sh -c 'mkdir -p /usr/local/sbin && cat > /usr/local/sbin/autologin-root && chmod 0755 /usr/local/sbin/autologin-root' <<'AUTOLOGIN' #!/bin/sh exec /bin/login -f root AUTOLOGIN