Extend PVE support to version 9.0 and 9.1 in all pve_check functions

This commit is contained in:
CanbiZ 2025-11-19 16:38:50 +01:00
parent eea15912e2
commit 9e22bee07e
10 changed files with 25 additions and 25 deletions

View File

@ -272,7 +272,7 @@ root_check() {
# pve_check()
#
# - Validates Proxmox VE version compatibility
# - Supported: PVE 8.0-8.9 and PVE 9.0 only
# - Supported: PVE 8.0-8.9 and PVE 9.0-9.1
# - Exits with error message if unsupported version detected
# ------------------------------------------------------------------------------
pve_check() {
@ -290,12 +290,12 @@ pve_check() {
return 0
fi
# Check for Proxmox VE 9.x: allow ONLY 9.0
# Check for Proxmox VE 9.x: allow 9.09.1
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
local MINOR="${BASH_REMATCH[1]}"
if ((MINOR != 0)); then
if ((MINOR < 0 || MINOR > 1)); then
msg_error "This version of Proxmox VE is not yet supported."
msg_error "Supported: Proxmox VE version 9.0"
msg_error "Supported: Proxmox VE version 9.0 9.1"
exit 1
fi
return 0
@ -303,7 +303,7 @@ pve_check() {
# All other unsupported versions
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported versions: Proxmox VE 8.0 8.x or 9.0"
msg_error "Supported versions: Proxmox VE 8.0 8.9 or 9.0 9.1"
exit 1
}

View File

@ -118,9 +118,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -185,9 +185,9 @@ function msg_error() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -181,9 +181,9 @@ function msg_error() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -119,9 +119,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -135,9 +135,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -138,9 +138,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -138,9 +138,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -130,9 +130,9 @@ function check_root() {
}
function pve_check() {
if ! pveversion | grep -Eq "pve-manager/8\.[1-4](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/(8\.[1-4]|9\.[0-1])(\.[0-9]+)*"; then
msg_error "${CROSS}${RD}This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.1 or later."
echo -e "Requires Proxmox Virtual Environment Version 8.1 - 8.4 or 9.0 - 9.1."
echo -e "Exiting..."
sleep 2
exit

View File

@ -147,7 +147,7 @@ function check_root() {
}
# This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported.
# Supported: Proxmox VE 8.0.x 8.9.x and 9.0 (NOT 9.1+)
# Supported: Proxmox VE 8.0.x 8.9.x and 9.0 9.1
pve_check() {
local PVE_VER
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
@ -163,12 +163,12 @@ pve_check() {
return 0
fi
# Check for Proxmox VE 9.x: allow ONLY 9.0
# Check for Proxmox VE 9.x: allow 9.09.1
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
local MINOR="${BASH_REMATCH[1]}"
if ((MINOR != 0)); then
if ((MINOR < 0 || MINOR > 1)); then
msg_error "This version of Proxmox VE is not yet supported."
msg_error "Supported: Proxmox VE version 9.0"
msg_error "Supported: Proxmox VE version 9.0 9.1"
exit 1
fi
return 0