mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-04 01:45:55 +01:00
Previously, when a container was stopped or base package installation failed during 'Customizing LXC Container', the error handler's simple 'Remove broken container? (Y/n)' prompt appeared instead of the full recovery menu with retry/repair options (verbose rebuild, APT repair, OOM retry, DNS override). Root cause: set -Eeuo pipefail and ERR trap were still active during the customization phase (locale, timezone, base packages). The exit 1 triggered error_handler() which has its own cleanup flow, bypassing the full recovery menu in build_container(). Changes: - Disable ERR trap before customization phase (not just before lxc-attach) - Replace exit 1 with install_exit_code=1 for base package failures - Wrap lxc-attach section in if-block that skips when customization failed - Both customization and install errors now reach the full recovery menu - Fix read in error_handler.func to use </dev/tty (same curl stdin issue) - Eliminates 'pop_var_context: head of shell_variables not a function context' bash error caused by double-exit (exit 1 -> ERR trap -> exit)