cancel from interface screen

also part of fixing #154
This commit is contained in:
jacobsalmela 2016-01-18 21:53:09 -06:00
parent 59d8277b7b
commit 14fef45e47

View file

@ -103,12 +103,18 @@ done <<< "$availableInterfaces"
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 [[ $chooseInterfaceOptions ]];then
for desiredInterface in $chooseInterfaceOptions for desiredInterface in $chooseInterfaceOptions
do do
piholeInterface=$desiredInterface piholeInterface=$desiredInterface
echo "Using interface: $piholeInterface" echo "Using interface: $piholeInterface"
echo ${piholeInterface} > /tmp/piholeINT echo ${piholeInterface} > /tmp/piholeINT
done done
else
# Exit if user cancels
echo "Cancelling installation."
exit
fi
} }
use4andor6() use4andor6()