Only allow UP interfaces to be selected. (DOWN interfaces would have not given IP addresses anyways.)

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2016-12-24 14:50:50 -08:00
parent c2b8bed3a8
commit 1d608b204a
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -187,8 +187,8 @@ find_IPv4_information() {
}
get_available_interfaces() {
# Get available interfaces. Consider only getting UP interfaces in the future, and leaving DOWN interfaces out of list.
availableInterfaces=$(ip -o link | awk '{print $2}' | grep -v "lo" | cut -d':' -f1 | cut -d'@' -f1)
# Get available UP interfaces.
availableInterfaces=$(ip -o link | grep "state UP" | awk '{print $2}' | cut -d':' -f1 | cut -d'@' -f1)
}
welcomeDialogs() {