X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Frun.sh;h=fda1e75389996e223b57dc5bec64fc8e18ce0ccd;hb=d182b8a69eeef01f37b123e7d331972b7c57911d;hp=daf239466a9cb3c023eec1c1b102825b3c6afd51;hpb=545586015e5b768875672352afe77a5a850a9d86;p=doctor.git diff --git a/tests/run.sh b/tests/run.sh index daf23946..fda1e753 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -294,8 +294,7 @@ inject_failure() { echo "disabling network of compute host [$COMPUTE_HOST] for 3 mins..." cat > disable_network.sh << 'END_TXT' #!/bin/bash -x -dev=$(sudo ip a | awk '/ @COMPUTE_IP@\//{print $7}') -[[ -n "$dev" ]] || dev=$(sudo ip a | awk '/ @COMPUTE_IP@\//{print $5}') +dev=$(sudo ip a | awk '/ @COMPUTE_IP@\//{print $NF}') sleep 1 sudo ip link set $dev down echo "doctor set link down at" $(date "+%s.%N")