From c53d1d004a25b66db3f7263805fdd42c3ab6beff Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Wed, 6 Aug 2025 13:46:07 +0200 Subject: [PATCH] PVE9: Remove Beta Whiptail / add correct version check (#6599) --- misc/build.func | 22 +++++++++++----------- vm/archlinux-vm.sh | 23 ++++++++++++----------- vm/debian-vm.sh | 23 ++++++++++++----------- vm/docker-vm.sh | 23 ++++++++++++----------- vm/haos-vm.sh | 23 ++++++++++++----------- vm/mikrotik-routeros.sh | 23 ++++++++++++----------- vm/nextcloud-vm.sh | 23 ++++++++++++----------- vm/openwrt.sh | 23 ++++++++++++----------- vm/opnsense-vm.sh | 23 ++++++++++++----------- vm/owncloud-vm.sh | 23 ++++++++++++----------- vm/pimox-haos-vm.sh | 23 ++++++++++++----------- vm/ubuntu2204-vm.sh | 23 ++++++++++++----------- vm/ubuntu2404-vm.sh | 23 ++++++++++++----------- vm/ubuntu2504-vm.sh | 23 ++++++++++++----------- vm/umbrel-os-vm.sh | 23 ++++++++++++----------- 15 files changed, 179 insertions(+), 165 deletions(-) diff --git a/misc/build.func b/misc/build.func index d736a4090..6a26d1f4a 100644 --- a/misc/build.func +++ b/misc/build.func @@ -65,36 +65,36 @@ root_check() { } # 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/archlinux-vm.sh b/vm/archlinux-vm.sh index 2eae37e82..a0689b998 100644 --- a/vm/archlinux-vm.sh +++ b/vm/archlinux-vm.sh @@ -138,36 +138,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 0642800d8..7773e6992 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -138,36 +138,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/docker-vm.sh b/vm/docker-vm.sh index c7f1fe300..2cb92d934 100644 --- a/vm/docker-vm.sh +++ b/vm/docker-vm.sh @@ -139,36 +139,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 26b823056..854551921 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -142,36 +142,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index 21b5a3007..942c9976e 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -139,36 +139,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index 62ad1ea56..7bf3524bd 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -138,36 +138,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/openwrt.sh b/vm/openwrt.sh index aad2fc08f..bf0d7d718 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -184,36 +184,37 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/opnsense-vm.sh b/vm/opnsense-vm.sh index 57abada7f..7ddd6acc4 100644 --- a/vm/opnsense-vm.sh +++ b/vm/opnsense-vm.sh @@ -180,36 +180,37 @@ function msg_error() { echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}" } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 689d7b23c..8d17ff152 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -139,36 +139,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/pimox-haos-vm.sh b/vm/pimox-haos-vm.sh index 09852a80d..f69d9a7b4 100644 --- a/vm/pimox-haos-vm.sh +++ b/vm/pimox-haos-vm.sh @@ -147,36 +147,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/ubuntu2204-vm.sh b/vm/ubuntu2204-vm.sh index 7405ca070..44b4b0395 100644 --- a/vm/ubuntu2204-vm.sh +++ b/vm/ubuntu2204-vm.sh @@ -134,36 +134,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index af4c4c81c..37914773b 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -137,36 +137,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/ubuntu2504-vm.sh b/vm/ubuntu2504-vm.sh index 0e3355944..c5d431f6f 100644 --- a/vm/ubuntu2504-vm.sh +++ b/vm/ubuntu2504-vm.sh @@ -136,36 +136,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 } diff --git a/vm/umbrel-os-vm.sh b/vm/umbrel-os-vm.sh index 2ba58dcf7..e9f75f609 100644 --- a/vm/umbrel-os-vm.sh +++ b/vm/umbrel-os-vm.sh @@ -138,36 +138,37 @@ function check_root() { fi } +# 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+) pve_check() { local PVE_VER PVE_VER="$(pveversion | awk -F'/' '{print $2}' | awk -F'-' '{print $1}')" - # Check for Proxmox VE 8.x + # Check for Proxmox VE 8.x: allow 8.0–8.9 if [[ "$PVE_VER" =~ ^8\.([0-9]+) ]]; then local MINOR="${BASH_REMATCH[1]}" - if ((MINOR < 1 || MINOR > 4)); then + if ((MINOR < 0 || MINOR > 9)); then msg_error "This version of Proxmox VE is not supported." - echo -e "Required: Proxmox VE version 8.1 – 8.4" + msg_error "Supported: Proxmox VE version 8.0 – 8.9" exit 1 fi return 0 fi - # Check for Proxmox VE 9.x (Beta) — require confirmation + # Check for Proxmox VE 9.x: allow ONLY 9.0 if [[ "$PVE_VER" =~ ^9\.([0-9]+) ]]; then - 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." + local MINOR="${BASH_REMATCH[1]}" + if ((MINOR != 0)); then + msg_error "This version of Proxmox VE is not yet supported." + msg_error "Supported: Proxmox VE version 9.0" exit 1 fi + return 0 fi # 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)" + msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0" exit 1 }