From 8eb2bbd4f7d2542ed47dad4a67b0f607f47e0e53 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:09:47 +0200 Subject: [PATCH] Update build.func --- misc/build.func | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/misc/build.func b/misc/build.func index 27191f0e..adf2c4b3 100644 --- a/misc/build.func +++ b/misc/build.func @@ -85,30 +85,32 @@ pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # 8 Version Check + # Check for Proxmox VE 8.x if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" if ((MINOR < 1 || MINOR > 4)); then - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 – 8.4" - echo -e "Exiting..." - sleep 2 + msg_error "This version of Proxmox VE is not supported." + echo -e "Required: Proxmox VE version 8.1 – 8.4" exit 1 fi return 0 fi - # 9 Beta Version Check + # Check for Proxmox VE 9.x (Beta) — require confirmation if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - msg_custom "Detected Proxmox Virtual Environment $PVE_VER – Beta state, use with caution!" - return 0 + if whiptail --title "Proxmox 9.x Detected (Beta)" \ + --yesno "You are using Proxmox VE $PVE_VER, which is currently in Beta state.\n\nThis version is experimentally supported.\n\nDo you want to proceed anyway?" 12 70; then + msg_ok "Confirmed: Continuing with Proxmox VE $PVE_VER" + return 0 + else + msg_error "Aborted by user: Proxmox VE 9.x was not confirmed." + exit 1 + fi fi - # All others (unsupported versions) - msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires Proxmox Virtual Environment Version 8.1 – 8.4 or 9.x (Beta)" - echo -e "Exiting..." - sleep 2 + # All other unsupported versions + msg_error "This version of Proxmox VE is not supported." + echo -e "Supported versions: Proxmox VE 8.1 – 8.4 or 9.x (Beta, with confirmation)" exit 1 }