Extend PVE support to version 9.0 and 9.1 in all pve_check functions
This commit is contained in:
parent
eea15912e2
commit
9e22bee07e
@ -272,7 +272,7 @@ root_check() {
|
|||||||
# pve_check()
|
# pve_check()
|
||||||
#
|
#
|
||||||
# - Validates Proxmox VE version compatibility
|
# - 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
|
# - Exits with error message if unsupported version detected
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
pve_check() {
|
pve_check() {
|
||||||
@ -290,12 +290,12 @@ pve_check() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for Proxmox VE 9.x: allow ONLY 9.0
|
# Check for Proxmox VE 9.x: allow 9.0–9.1
|
||||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
||||||
local MINOR="${BASH_REMATCH[1]}"
|
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 "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
|
exit 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
@ -303,7 +303,7 @@ pve_check() {
|
|||||||
|
|
||||||
# All other unsupported versions
|
# All other unsupported versions
|
||||||
msg_error "This version of Proxmox VE is not supported."
|
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
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -118,9 +118,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -185,9 +185,9 @@ function msg_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -181,9 +181,9 @@ function msg_error() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -119,9 +119,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -135,9 +135,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -138,9 +138,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -138,9 +138,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -130,9 +130,9 @@ function check_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pve_check() {
|
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"
|
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..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
|
|||||||
@ -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.
|
# 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() {
|
pve_check() {
|
||||||
local PVE_VER
|
local PVE_VER
|
||||||
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')"
|
||||||
@ -163,12 +163,12 @@ pve_check() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for Proxmox VE 9.x: allow ONLY 9.0
|
# Check for Proxmox VE 9.x: allow 9.0–9.1
|
||||||
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then
|
||||||
local MINOR="${BASH_REMATCH[1]}"
|
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 "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
|
exit 1
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user