fix: Pass both -y flag and env var to first_time_install.sh for non-interactive mode

Ensure first_time_install.sh runs in non-interactive mode by passing both:
1. The -y command-line flag
2. The LEDMATRIX_ASSUME_YES=1 environment variable

This is necessary because first_time_install.sh re-executes itself with sudo
if not running as root (line 131), and we need to ensure the non-interactive
flag is preserved through the re-execution.

Also added debug_install.sh diagnostic script to help troubleshoot
installation failures on the Pi.
This commit is contained in:
Chuck
2026-01-09 12:51:53 -05:00
parent c198fecb78
commit 7b90abda53
2 changed files with 86 additions and 3 deletions

View File

@@ -273,13 +273,15 @@ main() {
if [ "$EUID" -eq 0 ]; then
chmod 1777 /tmp 2>/dev/null || true
export TMPDIR=/tmp
# Run in non-interactive mode with ASSUME_YES
# Run in non-interactive mode with ASSUME_YES (both -y flag and env var for safety)
export LEDMATRIX_ASSUME_YES=1
bash ./first_time_install.sh -y
else
sudo chmod 1777 /tmp 2>/dev/null || true
export TMPDIR=/tmp
# Pass environment variable for non-interactive mode and preserve TMPDIR
sudo -E env TMPDIR=/tmp LEDMATRIX_ASSUME_YES=1 bash ./first_time_install.sh
# Pass both -y flag AND environment variable for non-interactive mode
# This ensures it works even if the script re-executes itself with sudo
sudo -E env TMPDIR=/tmp LEDMATRIX_ASSUME_YES=1 bash ./first_time_install.sh -y
fi
INSTALL_EXIT_CODE=$?
set -e # Re-enable errexit