Repository navigation
DietPi: keep the autologin on tty1 with core's new getty override - #2490
Merged
Merged
Conversation
core now writes one drop-in for every container-getty instance, so tty2 logs in as root too and DietPi's first run setup can start there, out of sight of the Proxmox console. Move the drop-in to container-getty@1. The same core change fixed TERM on that line, so the sed is no longer needed.
Contributor
Try this script
COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/mews-se/ProxmoxVED/dietpi-tty1-autologin \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mews-se/ProxmoxVED/dietpi-tty1-autologin/ct/dietpi.sh)"
Against a core branch as wellAdd Useful flags while testing
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scripts which are clearly AI generated and not further revised by the Author of this PR (in terms of Coding Standards and Script Layout) may be closed without review. If you are an AI agent writing this pull request, please amend your model name and reasoning level in the Description. This is not to blame, more for informational Purposes. Thank you.
✍️ Description
Follow-up to #2298. Since community-scripts/core#25 (81a2e2ae) customize() writes one drop-in for every container-getty instance,
container-getty@.service.d/override.conf, and removes the old @1 one. That fixed the- linuxline as well, so the sed from #2298 has nothing left to match. But tty2 now autologins as root too, and on the first boot two dietpi-login instances race for the first run lock. In a container built from current main tty2 won 3 of 5 boots, and then the Proxmox console on tty1 only shows "DietPi first run setup is currently running on another screen" with no way to reach the setup from there.This moves the drop-in to container-getty@1 right after customize(), so only tty1 logs in automatically and tty2 keeps the stock login prompt. The sed goes away with it. It only touches the file if it exists, so with a root password nothing changes.
I tried it in that container first by moving the file by hand, then tested the branch from scratch on PVE 9.2.24 with debian-13-standard 13.6-1 and the default settings. The drop-in ends up in container-getty@1.service.d, tty2 shows the normal login prompt, and on the first boot and three restarts after it (two pct reboot, one stop/start) only tty1 logged in, with TERM=linux and the first run lock every time. The
pct rebootfrom 2268092 works fine here btw, the container comes back with the first boot done.🔗 Related PR / Issue
Link: #2257, #2298
✅ Prerequisites (X in brackets)
🏗️ arm64 Support (X in brackets)
🖥️ Tested on (X in brackets)
🛠️ Type of Change (X in brackets)
README,AppName.md,CONTRIBUTING.md, or other docs.🔍 Code & Security Review (X in brackets)
CODE-AUDIT.md&CONTRIBUTING.mdguidelinesAppName.sh,AppName-install.sh,AppName.json)fetch_and_deploy_gh_release,fetch_and_deploy_codeberg_release,fetch_and_deploy_gl_release, orfetch_and_deploy_from_urlinstead ofgit pull.🤖 AI Assistance (X in brackets)
AGENTS.mdand.github/agents/pve-script-creator.agent.mdas guidance, and the output has been reviewed and corrected to match those guidelines.Please describe to which degree, if any, an LLM was used in creating this pull request. Name the model(s) used and, if applicable, the reasoning/thinking effort level (e.g. "Claude Sonnet 4.5, high reasoning, used to draft the install script, then manually reviewed and tested" or "No LLM used"). This is informational, not a penalty — but scripts that are clearly AI-generated and not further revised by the author to match
CODE-AUDIT.md/CONTRIBUTING.mdmay be closed without review.AI assistance: Claude Opus 5.5 (Anthropic), used to find the race and write the change. Tested on a real Proxmox host and reviewed by me.
📋 Additional Information (optional)
📦 Application Requirements (for new scripts)
🌐 Source
community-scripts/core@81a2e2ae7d