Posted on 10-01-2019 07:41 AM
I am using the following to create an EA to return the Mac address of the Ethernet adapters but the field is blank. Any ideas as to what might be the cause?
USBMAC=$(networksetup -listallhardwareports | awk '/Hardware Port: USB /{getline; getline; print $NF}')
if [[ "$USBMAC" == "" ]]; then
echo "<result>N/A</result>"
else
echo "<result>$USBmac</result>"
fi
When I run networksetup -listallhardwareports | awk '/Hardware Port: USB /{getline; getline; print $NF}' directly on the Mac in question it does return the MAC address of the adapter.
Posted on 10-01-2019 11:03 AM
When was the EA created? Just today? If so, have you run an inventory collection on any Mac yet? Because EA values only get populated when inventory is collected on each machine.