Update build.func

This commit is contained in:
CanbiZ 2025-07-28 10:09:47 +02:00
parent f3d8cab8e1
commit 8eb2bbd4f7

View File

@ -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
}