From 7fb7df7f6ecb6fb9657762aa578464a0030741ef Mon Sep 17 00:00:00 2001 From: ryt51V Date: Sat, 27 Feb 2016 19:13:22 +0000 Subject: [PATCH] List interfaces from ifconfig, which distinguishes different labels / aliases of a single physical interface. --- automated install/basic-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b3e6202f..c4a188b1 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -43,7 +43,9 @@ IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1 IPv4addr=$(ip -o -f inet addr show dev $IPv4dev | awk '{print $4}' | awk 'END {print}') IPv4gw=$(ip route get 8.8.8.8 | awk '{print $3}') -availableInterfaces=$(ip -o link | awk '{print $2}' | grep -v "lo" | cut -d':' -f1) +# All interfaces, including interface "labels" +# i.e. multiple IPs on one physical interface. +availableInterfaces=$(ifconfig -a | sed 's/[ \t].*//;/^\(lo\|\)$/d') dhcpcdFile=/etc/dhcpcd.conf ######## FIRST CHECK ########