diff --git a/static/ip.sh b/static/ip.sh index 7d883762..604dc250 100644 --- a/static/ip.sh +++ b/static/ip.sh @@ -3,7 +3,7 @@ IFCONFIG="/sbin/ifconfig" INTERFACES="/etc/network/interfaces" -IFACE=$(lshw -c network | grep "logical name" | awk '{print $3}') +IFACE=$(lshw -c network | grep "logical name" | awk '{print $3; exit}') ADDRESS=$(hostname -I | cut -d ' ' -f 1) NETMASK=$($IFCONFIG | grep -w inet |grep -v 127.0.0.1| awk '{print $4}' | cut -d ":" -f 2) GATEWAY=$(route -n|grep "UG"|grep -v "UGH"|cut -f 10 -d " ")