From 39ea1d4a20b83c07d084ebafdc811eec3548f289 Mon Sep 17 00:00:00 2001 From: tteckster Date: Sun, 30 Jun 2024 10:18:37 -0400 Subject: [PATCH] Require PVE 8.1 or later --- misc/build.func | 9 +++------ vm/debian-vm.sh | 6 +++--- vm/haos-vm.sh | 6 +++--- vm/mikrotik-routeros.sh | 10 +++++----- vm/nextcloud-vm.sh | 6 +++--- vm/openwrt.sh | 8 ++++---- vm/owncloud-vm.sh | 6 +++--- vm/ubuntu2204-vm.sh | 6 +++--- vm/ubuntu2404-vm.sh | 6 +++--- 9 files changed, 30 insertions(+), 33 deletions(-) diff --git a/misc/build.func b/misc/build.func index c7c501e7..b650a6c0 100644 --- a/misc/build.func +++ b/misc/build.func @@ -95,16 +95,13 @@ root_check() { # This function checks the version of Proxmox Virtual Environment (PVE) and exits if the version is not supported. pve_check() { - if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then - whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60 - fi - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } # This function checks the system architecture and exits if it's not "amd64". diff --git a/vm/debian-vm.sh b/vm/debian-vm.sh index 5061d4ac..d6159317 100644 --- a/vm/debian-vm.sh +++ b/vm/debian-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index 4c82712a..bad50312 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -115,13 +115,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/mikrotik-routeros.sh b/vm/mikrotik-routeros.sh index af4fd0c2..f9e05f33 100644 --- a/vm/mikrotik-routeros.sh +++ b/vm/mikrotik-routeros.sh @@ -62,11 +62,11 @@ function cleanup() { } TEMP_DIR=$(mktemp -d) pushd $TEMP_DIR >/dev/null - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then - echo "⚠ This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." - echo "Exiting..." - sleep 3 +if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; 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 "Exiting..." + sleep 2 exit fi if (whiptail --backtitle "Proxmox VE Helper Scripts" --title "Mikrotik RouterOS CHR VM" --yesno "This will create a New Mikrotik RouterOS CHR VM. Proceed?" 10 58); then diff --git a/vm/nextcloud-vm.sh b/vm/nextcloud-vm.sh index 23cc5606..1e50c37d 100644 --- a/vm/nextcloud-vm.sh +++ b/vm/nextcloud-vm.sh @@ -91,13 +91,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/openwrt.sh b/vm/openwrt.sh index e3e32e9e..3cdd38f3 100644 --- a/vm/openwrt.sh +++ b/vm/openwrt.sh @@ -157,13 +157,13 @@ function msg_error() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then - echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; 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 "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/owncloud-vm.sh b/vm/owncloud-vm.sh index 006a4649..871f5eeb 100644 --- a/vm/owncloud-vm.sh +++ b/vm/owncloud-vm.sh @@ -91,13 +91,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/ubuntu2204-vm.sh b/vm/ubuntu2204-vm.sh index 5fffcf0d..cb6884d8 100644 --- a/vm/ubuntu2204-vm.sh +++ b/vm/ubuntu2204-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() { diff --git a/vm/ubuntu2404-vm.sh b/vm/ubuntu2404-vm.sh index 7869d189..c3dd1750 100644 --- a/vm/ubuntu2404-vm.sh +++ b/vm/ubuntu2404-vm.sh @@ -92,13 +92,13 @@ function check_root() { } function pve_check() { - if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then + if ! pveversion | grep -Eq "pve-manager/8.[1-3]"; then msg_error "This version of Proxmox Virtual Environment is not supported" - echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later." + echo -e "Requires Proxmox Virtual Environment Version 8.1 or later." echo -e "Exiting..." sleep 2 exit - fi +fi } function arch_check() {