CLOUDSTACK-2804 getEthByIp function in vpc_func.sh can return the wrong

network interface
This commit is contained in:
Hugo Trippaers 2013-06-03 10:52:41 +02:00
parent 54127f838e
commit 5c9828db7d
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ getEthByIp (){
local ip=$1
for dev in `ls -1 /sys/class/net | grep eth`
do
sudo ip addr show dev $dev | grep $ip > /dev/null
sudo ip addr show dev $dev | grep $ip\/ > /dev/null
if [ $? -eq 0 ]
then
echo $dev