Skip to content

redispass.py draws its password box on the terminal, not in the hook's pipe - #6

Merged
marcos-mendez merged 1 commit into
mainfrom
fix/redispass-draws-on-the-terminal
Sep 30, 2026
Merged

marcos-mendez merged 1 commit into
mainfrom
fix/redispass-draws-on-the-terminal

Conversation

@marcos-mendez

Copy link
Copy Markdown
Contributor

firstboot.d/35redispass captures bin/redispass.py's standard output for DB_PASS=, and dialog draws on standard output, so an interactive first boot would freeze with the box drawn into the command substitution: the bug keel-wordpress 19.0-3 hit on Proxmox on 2026-09-30, fixed for dbpass.py in Keel-Linux/keel-mariadb#20.

Fix: the same pattern. redispass.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.db_password instead of a traceback. The hook is unchanged. Version 1.0.3.

Tests: tests/dialog.bats runs 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.

…hook's pipe

35redispass captures redispass.py's standard output for DB_PASS=, and dialog draws on standard output, so an interactive first boot would freeze with the box drawn into the command substitution (the bug keel-wordpress 19.0-3 hit on Proxmox on 2026-09-30, keel-mariadb#20). 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 secrets.db_password instead of a traceback. tests/dialog.bats runs the script as the hook does inside script(1) and fails on the old code. Version 1.0.3.
@marcos-mendez
marcos-mendez merged commit e184e52 into main Sep 30, 2026
2 checks passed
@marcos-mendez
marcos-mendez deleted the fix/redispass-draws-on-the-terminal branch September 30, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant