Commit f2e64f58 authored by Peter Möller's avatar Peter Möller

Correction: added path for ethtool

parent c82e77f0
......@@ -264,8 +264,8 @@ do
IP4=$(ip -4 -o a show ${iname%%@if[0-9]*} | awk '{print $4}')
IP6=$(ip -6 -o a show ${iname%%@if[0-9]*} | awk '{print $4}')
MAC="$(ip link show dev ${iname%%@if[0-9]*} |awk '/link/{print $2}')"
MAC_P=$(ethtool -P ${iname%%@if[0-9]*} | awk '{print $NF}')
Speed="$(ethtool ${iname%%@if[0-9]*} | grep "Speed:" | awk '{print $NF}')"
MAC_P=$(/sbin/ethtool -P ${iname%%@if[0-9]*} | awk '{print $NF}')
Speed="$(/sbin/ethtool ${iname%%@if[0-9]*} | grep "Speed:" | awk '{print $NF}')"
OUTPUT+="{ \"interface\": \"$iname\", \"ip4\": \"${IP4}\", \"ip6\": \"${IP6}\", \"mac\": \"${MAC}\", \"mac-p\": \"${MAC_P}\", \"speed\": \"${Speed/000Mb/ Gb}\" },"
NIStr="\"network-interfaces\": [ $(echo "${OUTPUT}" | sed 's/,$//') ]"
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