Config File
This commit is contained in:
parent
24dc2c887a
commit
ef0fcb96a1
@ -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}"
|
||||
|
@ -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}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user