mirror of
https://github.com/pi-hole/pi-hole
synced 2024-11-17 21:59:55 +00:00
Cleaned up output, Fixed Cancel button
This commit is contained in:
parent
fdf805bc7b
commit
432e6d5395
@ -305,7 +305,7 @@ setDNS(){
|
|||||||
OpenDNS "" off
|
OpenDNS "" off
|
||||||
Level3 "" off
|
Level3 "" off
|
||||||
Norton "" off
|
Norton "" off
|
||||||
Comodo "" off)
|
Comodo "" off
|
||||||
Other "" off)
|
Other "" off)
|
||||||
DNSchoices=$("${DNSChoseCmd[@]}" "${DNSChooseOptions[@]}" 2>&1 >/dev/tty)
|
DNSchoices=$("${DNSChoseCmd[@]}" "${DNSChooseOptions[@]}" 2>&1 >/dev/tty)
|
||||||
if [[ $? = 0 ]];then
|
if [[ $? = 0 ]];then
|
||||||
@ -339,12 +339,15 @@ setDNS(){
|
|||||||
until [[ $DNSSettingsCorrect = True ]]
|
until [[ $DNSSettingsCorrect = True ]]
|
||||||
do
|
do
|
||||||
piholeDNS=$(whiptail --backtitle "Specify Upstream DNS Provider(s)" --inputbox "Enter your desired upstream DNS provider(s)" $r $c "8.8.8.8, 8.8.4.4" 3>&1 1>&2 2>&3)
|
piholeDNS=$(whiptail --backtitle "Specify Upstream DNS Provider(s)" --inputbox "Enter your desired upstream DNS provider(s)" $r $c "8.8.8.8, 8.8.4.4" 3>&1 1>&2 2>&3)
|
||||||
piholeDNS1=$(echo $piholeDNS | sed 's/[, \t]\+/,/g' | awk -F, '{print$1}')
|
if [[ $? = 0 ]];then
|
||||||
piholeDNS2=$(echo $piholeDNS | sed 's/[, \t]\+/,/g' | awk -F, '{print$2}')
|
piholeDNS1=$(echo $piholeDNS | sed 's/[, \t]\+/,/g' | awk -F, '{print$1}')
|
||||||
|
piholeDNS2=$(echo $piholeDNS | sed 's/[, \t]\+/,/g' | awk -F, '{print$2}')
|
||||||
|
else
|
||||||
|
echo "::: Cancel selected, exiting...."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if (whiptail --backtitle "Specify Upstream DNS Provider(s)" --title "Upstream DNS Provider(s)" --yesno "Are these settings correct?
|
if (whiptail --backtitle "Specify Upstream DNS Provider(s)" --title "Upstream DNS Provider(s)" --yesno "Are these settings correct?\n DNS Server 1: $piholeDNS1\n DNS Server 2: $piholeDNS2" $r $c) then
|
||||||
DNS Server 1: $piholeDNS1
|
|
||||||
DNS Server 2: $piholeDNS2" $r $c) then
|
|
||||||
DNSSettingsCorrect=True
|
DNSSettingsCorrect=True
|
||||||
else
|
else
|
||||||
# If the settings are wrong, the loop continues
|
# If the settings are wrong, the loop continues
|
||||||
|
Loading…
Reference in New Issue
Block a user