From d69e76a97db0e6b42966b51b5958b676a9fadbcb Mon Sep 17 00:00:00 2001 From: tteckster Date: Sat, 3 Dec 2022 13:01:27 -0500 Subject: [PATCH] Update debian-v4.sh --- ct/debian-v4.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ct/debian-v4.sh b/ct/debian-v4.sh index 64625a86..4373124f 100644 --- a/ct/debian-v4.sh +++ b/ct/debian-v4.sh @@ -88,8 +88,9 @@ function default_settings() { echo -e "${DGN}Using Static IP Address: ${BGN}dhcp${CL}" NET=dhcp echo -e "${DGN}Using Gateway Address: ${BGN}Default${CL}" - NS="" GATE="" + echo -e "${DGN}Using DNS Server Address: ${BGN}Host${CL}" + NS="" echo -e "${DGN}Using MAC Address: ${BGN}Default${CL}" MAC="" echo -e "${DGN}Using VLAN Tag: ${BGN}Default${CL}" @@ -194,7 +195,18 @@ function advanced_settings() { echo -e "${DGN}Using Gateway IP Address: ${BGN}$GATE1${CL}" fi fi - MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + NS=$(whiptail --inputbox "Set a DNS Server IP (blank for HOST)" 8 58 --title "DNS SERVER IP" --cancel-button Exit-Script 3>&1 1>&2 2>&3) + exitstatus=$? + if [ $exitstatus = 0 ]; then + if [ -z $NS ]; then + NS="" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}Host${CL}" + else + NS="-nameserver=$NS" + echo -e "${DGN}Using DNS Server IP Address: ${BGN}$NS${CL}" + fi + fi + MAC1=$(whiptail --inputbox "Set a MAC Address(leave blank for default)" 8 58 --title "MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3) exitstatus=$? if [ $exitstatus = 0 ]; then if [ -z $MAC1 ]; then