Unverified Commit 5e54adf4 authored by Gauthier Provost's avatar Gauthier Provost Committed by GitHub
Browse files

Update debian-config-functions-network

Allow to chose a default interface that doesn't have an IP address yet.
Issue #26
parent b72ddca4
...@@ -556,7 +556,7 @@ function select_default_interface () ...@@ -556,7 +556,7 @@ function select_default_interface ()
for i in "${ADAPTER[@]}" for i in "${ADAPTER[@]}"
do do
local IPADDR=$(ip -4 addr show dev ${i[0]} | awk '/inet/ {print $2}' | cut -d'/' -f1) local IPADDR=$(ip -4 addr show dev ${i[0]} | awk '/inet/ {print $2}' | cut -d'/' -f1)
[[ -n $IPADDR && $IPADDR != "172.24.1.1" ]] && LIST+=( "${i[0]//[[:blank:]]/}" "${IPADDR}" ) [[ $IPADDR != "172.24.1.1" ]] && LIST+=( "${i[0]//[[:blank:]]/}" "${IPADDR}" )
done done
LIST_LENGHT=$((${#LIST[@]}/2)); LIST_LENGHT=$((${#LIST[@]}/2));
if [ "$LIST_LENGHT" -eq 0 ]; then if [ "$LIST_LENGHT" -eq 0 ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment