From b568026253e129c6efe75c62500920af82c10fc8 Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sun, 4 Jan 2026 16:06:59 -0500 Subject: [PATCH] Add comments explaining input buffer flush MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- rpi/first-boot-wizard.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpi/first-boot-wizard.sh b/rpi/first-boot-wizard.sh index bc88d6d..462c4ac 100755 --- a/rpi/first-boot-wizard.sh +++ b/rpi/first-boot-wizard.sh @@ -82,6 +82,7 @@ echo "" echo " [Y] Enable HTTPS (recommended for home network security)" echo " [n] Use HTTP only (unencrypted, not recommended)" echo "" +# Flush input buffer to prevent stray keystrokes from auto-answering read -t 0.1 -n 10000 discard 2>/dev/null || true read -p "Enable HTTPS? [Y/n] " -n 1 -r echo @@ -112,6 +113,7 @@ if [ "$ENABLE_HTTPS" = "true" ]; then echo " [Y] Use port 443 (cleaner URLs)" echo " [n] Use port 5000 (default, no extra config)" echo "" + # Flush input buffer to prevent stray keystrokes from auto-answering read -t 0.1 -n 10000 discard 2>/dev/null || true read -p "Use standard port 443? [Y/n] " -n 1 -r echo @@ -142,6 +144,7 @@ echo "" echo " [y] Generate a private channel key" echo " [N] Use public mode (anyone can decode)" echo "" +# Flush input buffer to prevent stray keystrokes from auto-answering read -t 0.1 -n 10000 discard 2>/dev/null || true read -p "Generate a private channel key? [y/N] " -n 1 -r echo