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 <noreply@anthropic.com>
This commit is contained in:
1 parent
78c3a790be
commit
4cb36b7807
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user