Repository navigation
wordpress.py draws its password boxes on the terminal, not in the hook's pipe - #14
Merged
Merged
Conversation
…e hook's pipe 40wordpress reads wordpress.py's standard output for APP_PASS= and DB_PASS=, and dialog draws on standard output, so an interactive first boot froze with the box drawn into the pipe (the same bug as keel-mariadb#20, keel-wordpress 19.0-3 on Proxmox, 2026-09-30). The answers go to a duplicate of that pipe and standard output becomes the terminal the hook checked on standard input, else /dev/tty; without either the script names the instance description fields instead of a traceback. tests/dialog.bats runs the script as the hook does inside script(1) and fails on the old code.
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.
An interactive first boot of keel-wordpress 19.0-3 on Proxmox (2026-09-30) froze at a password box.
firstboot.d/40wordpressreadsbin/wordpress.py's standard output forAPP_PASS=andDB_PASS=, and dialog draws on standard output, so the box is drawn into the hook's pipe. Same bug and same fix as Keel-Linux/keel-mariadb#20.Fix: wordpress.py keeps a duplicate of the pipe for the KEY=value answers and points standard output, which dialog inherits, at the terminal the hook checked on standard input (else /dev/tty). Without any terminal it exits with a message naming secrets.app_password and secrets.db_password instead of a traceback. The hook is unchanged.
Tests:
tests/dialog.batsruns the script as the hook does, output redirected, inside a real pseudo terminal (script(1)), with a libinithooks stand-in whose get_password refuses unless fd 1 is a terminal; it fails on the old code and passes on the new. Also checked on the test LXC with the real dialog and libinithooks: all four boxes (two passwords, two confirmations) appear on the screen and the answers file holds exactly APP_PASS= and DB_PASS=.