From f087057c9812655fb0d7faabff5008dda7314a4e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 May 2012 19:30:51 +0200 Subject: [PATCH] use iproute2's ip, if available Signed-off-by: Nico Schottelius --- conf/explorer/interfaces | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/explorer/interfaces b/conf/explorer/interfaces index 64ab8aa7..76ff32bb 100755 --- a/conf/explorer/interfaces +++ b/conf/explorer/interfaces @@ -23,8 +23,13 @@ # If your OS is not supported please provide a ifconfig output # -uname_s="$(uname -s)" +# Use ip, if available +if which ip >/dev/null 2>&1; then + ip -o link show | sed -n 's/^[0-9]\+: \(.\+\): <.*/\1/p' + exit 0 +fi +uname_s="$(uname -s)" REGEXP='s/^(.*)(:[[:space:]]*flags=|Link encap).*/\1/p' case "$uname_s" in