From 61d739d191349f5a3d0de41f6cca2aed2bb05829 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Mon, 27 Jul 2026 10:45:17 +0200 Subject: [PATCH] Add resolve_os_version() and refactor template handling - Add `resolve_os_version()` to validate `var_version` against the host's pveam catalog before the settings summary, picking the nearest available version with interactive or unattended fallback - Extract `_list_os_versions()` and `_list_templates()` helpers to reduce duplication - Remove the inline version-picker dialogs from `create_lxc_container()`; version mismatches are now handled upfront - Change default Debian version from 12 to 13 - Fix implicit cancel on invalid/empty input in the LXC stack upgrade menu (return 2 instead of 4) - Fix cancel option handling: only explicit option 3/4 cancels, unknown input is treated as ignore - Honour return code 4 (cancel) from `offer_lxc_stack_upgrade_and_maybe_retry` - Redirect error_handler log dump to stderr to prevent data corruption when the trap fires inside command substitutions --- misc/build.func | 289 +++++++++++++++++++--------------------- misc/error_handler.func | 8 +- 2 files changed, 143 insertions(+), 154 deletions(-) diff --git a/misc/build.func b/misc/build.func index 31e641591..b6ee8ec87 100644 --- a/misc/build.func +++ b/misc/build.func @@ -895,6 +895,111 @@ choose_and_set_storage_for_file() { # SECTION 5: CONFIGURATION & DEFAULTS MANAGEMENT # ============================================================================== +# ------------------------------------------------------------------------------ +# Distinct versions of OS type $1 in the cached pveam catalog (no network). +# `pveam available` prints "
\t