Sumit Naiksatam fad053533c Changed the directory structure to a more organized one.
Fixed the imports to reflect the new structure.
2011-07-31 11:38:26 -07:00

16 lines
478 B
Bash
Executable File

#!/bin/bash
eths=`ifconfig -a | grep eth | cut -f1 -d " "`
for eth in $eths; do
bdf=`ethtool -i $eth | grep bus-info | cut -f2 -d " "`
deviceid=`lspci -n -s $bdf | cut -f4 -d ":" | cut -f1 -d " "`
if [ $deviceid = "0044" ]; then
used=`/sbin/ip link show $eth | grep "UP"`
avail=$?
if [ $avail -eq 1 ]; then
echo $eth
exit
fi
fi
done