harmonize pve versions check & vm vars (#3779)

* harmonize proxmox ve version check

* Update openwrt.sh

* push 0-4 and 1-4
This commit is contained in:
CanbiZ
2025-04-09 16:13:01 +02:00
committed by GitHub
parent a536c4a5a0
commit 874b61d4d5
17 changed files with 455 additions and 455 deletions

View File

@ -95,7 +95,7 @@ uninstall() {
msg_ok "Completed Successfully!\n"
}
if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
echo -e "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.0 or higher"
echo -e "Exiting..."

View File

@ -41,7 +41,7 @@ catch_errors() {
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
error_handler() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
printf "\e[?25h"
local exit_code="$?"
local line_number="$1"
@ -84,7 +84,7 @@ msg_ok() {
# This function displays a error message with a red color.
msg_error() {
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
printf "\e[?25h"
local msg="$1"
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
@ -102,7 +102,7 @@ while true; do
esac
done
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
msg_error "⚠️ Requires Proxmox Virtual Environment Version 8.0 or later."
msg_error "Exiting..."

View File

@ -41,7 +41,7 @@ function msg_ok() {
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
}
if ! pveversion | grep -Eq "pve-manager/(8\.[1-3])"; then
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.1 or higher"
echo -e "Exiting..."

View File

@ -234,7 +234,7 @@ while true; do
esac
done
if ! pveversion | grep -Eq "pve-manager/8\.[0-3](\.[0-9]+)*"; then
if ! pveversion | grep -Eq "pve-manager/8\.[0-4](\.[0-9]+)*"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires Proxmox Virtual Environment Version 8.0 or later."
echo -e "Exiting..."