Click here to return to the 'Auto-disable AirPort when ethernet is active' hint |
Display Ethernet
below to whatever title your own wired network adapter shows. Run networksetup -listnetworkserviceorder
and look through the list to find what your value is. (Display Ethernet
is what is shown for my Thunderbolt Display ethernet port.) eth_dev=`networksetup -listnetworkserviceorder | sed -En 's/^(Hardware Port: Display Ethernet, Device: (en.))$/1/p'`
wifi_dev=`networksetup -listnetworkserviceorder | sed -En 's/^(Hardware Port: (Wi-Fi|AirPort), Device: (en.))$/2/p'`
en0
with $eth_dev
and en1
with $wifi_dev
.