mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-24 23:23:42 +00:00
Improved IPv4 dialogs.
This commit is contained in:
parent
3df654586f
commit
8d2fc23d5a
1 changed files with 7 additions and 4 deletions
|
@ -147,7 +147,7 @@ chooseInterface() {
|
||||||
interfaceCount=$(echo "$availableInterfaces" | wc -l)
|
interfaceCount=$(echo "$availableInterfaces" | wc -l)
|
||||||
chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface" $r $c $interfaceCount)
|
chooseInterfaceCmd=(whiptail --separate-output --radiolist "Choose An Interface" $r $c $interfaceCount)
|
||||||
chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty)
|
chooseInterfaceOptions=$("${chooseInterfaceCmd[@]}" "${interfacesArray[@]}" 2>&1 >/dev/tty)
|
||||||
if [[ ! ($? = 0) ]];then
|
if [[ ! ($? = 0) ]]; then
|
||||||
echo "::: Cancel selected, exiting...."
|
echo "::: Cancel selected, exiting...."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -179,7 +179,7 @@ chooseInterface() {
|
||||||
|
|
||||||
# Find out how many IP addresses are available to choose from
|
# Find out how many IP addresses are available to choose from
|
||||||
IPv4Count=$(echo "$IPv4addresses" | wc -l)
|
IPv4Count=$(echo "$IPv4addresses" | wc -l)
|
||||||
chooseIPv4Cmd=(whiptail --separate-output --radiolist "Choose an IPv4 address on this interface." $r $c $IPv4Count)
|
chooseIPv4Cmd=(whiptail --separate-output --radiolist "Choose an IPv4 address on this interface.\n\n(If you are unsure, leave it as the default.)" $r $c $IPv4Count)
|
||||||
IPv4addr=$("${chooseIPv4Cmd[@]}" "${IPv4Array[@]}" 2>&1 >/dev/tty)
|
IPv4addr=$("${chooseIPv4Cmd[@]}" "${IPv4Array[@]}" 2>&1 >/dev/tty)
|
||||||
|
|
||||||
if [[ ! ($? = 0) ]];then
|
if [[ ! ($? = 0) ]];then
|
||||||
|
@ -215,9 +215,12 @@ use4andor6() {
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $useIPv4 ]; then
|
if [ $useIPv4 ]; then
|
||||||
if (whiptail --backtitle "IPv4" --title "Reconfigure IPv4" --yesno "Do you wish to reconfigure your IPv4 settings? (If you have not changed these before on this Pi then choose yes.)
|
if (whiptail --backtitle "IPv4" --title "Reconfigure IPv4" --yesno --defaultno "Have you already configured a static IPv4 address on your Raspberry Pi as desired?\n\n(If you are unsure, choose No.) \n\nCurrent settings:
|
||||||
IPv4 address: $IPv4addr
|
IPv4 address: $IPv4addr
|
||||||
Gateway: $IPv4gw" $r $c) then
|
Gateway: $IPv4gw" $r $c)
|
||||||
|
then
|
||||||
|
echo "::: Leaving IPv4 settings as is."
|
||||||
|
else
|
||||||
getStaticIPv4Settings
|
getStaticIPv4Settings
|
||||||
setStaticIPv4
|
setStaticIPv4
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue