From ef0fcb96a196a7222ebd6954b0113761872f24b4 Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner Date: Tue, 20 May 2025 09:52:16 +0200 Subject: [PATCH] Config File --- misc/build.func | 4 ++-- misc/config-file.func | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/misc/build.func b/misc/build.func index d8b0ee0..f645f69 100644 --- a/misc/build.func +++ b/misc/build.func @@ -316,7 +316,7 @@ VERBOSE="${VERBOSE}" TAGS="${TAGS:-none}" VLAN="${VLAN:-none}" MTU="${MTU:-1500}" -GATE="${GATE:-none}" +GATE="${GATE:-}" SD="${SD:-none}" MAC="${MAC:-none}" NS="${NS:-none}" @@ -347,7 +347,7 @@ VERBOSE="${VERBOSE}" TAGS="${TAGS:-none}" VLAN="${VLAN:-none}" MTU="${MTU:-1500}" -GATE="${GATE:-none}" +GATE="${GATE:-}" SD="${SD:-none}" MAC="${MAC:-none}" NS="${NS:-none}" diff --git a/misc/config-file.func b/misc/config-file.func index 46f7bb1..a0bb727 100644 --- a/misc/config-file.func +++ b/misc/config-file.func @@ -265,7 +265,6 @@ config_file() { local ip_cidr_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/([0-9]{1,2})$' local ip_regex='^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$' - local ip_cidr_range_regex="^([0-9]{1,3}\.){3}[0-9]{1,3}/[0-9]{1,2}$" if [[ -n ${NET-} ]]; then if [ "$NET" == "dhcp" ]; then @@ -336,9 +335,9 @@ config_file() { while true; do GATE1=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) if [ -z "$GATE1" ]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then - whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 + whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Invalid IP address format" 8 58 else GATE=",gw=$GATE1" echo -e "${GATEWAY}${BOLD}${DGN}Gateway IP Address: ${BGN}$GATE1${CL}"