From eb8a211ce55be62cc20b186364968251166c79b4 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Mon, 27 Jul 2026 09:02:13 +0200 Subject: [PATCH] core: Handle LXC upgrade prompt cancellation Clarify the upgrade prompt options in `create_lxc_container`, treat empty or unrecognized input as ignore instead of implicit cancel, and explicitly abort container creation when the user chooses Cancel. --- misc/build.func | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/misc/build.func b/misc/build.func index 5ad76044e..c025c7e4f 100644 --- a/misc/build.func +++ b/misc/build.func @@ -6070,14 +6070,14 @@ create_lxc_container() { _has_fallback_option=true echo " [1] Run host upgrade now (recommended). WARNING: this runs apt upgrade and updates all Packages on your host!" echo " [2] Use an older ${PCT_OSTYPE} template instead (may not work with all scripts)" - echo " [3] Ignore" - echo " [4] Cancel" + echo " [3] Ignore (continue without upgrading)" + echo " [4] Cancel (abort the script)" echo read -rp "Select option [1/2/3/4]: " _ans honor it and abort before creating the container + if [[ $_lxc_stack_rc -eq 4 ]]; then + exit_script + fi fi fi