diff options
author | Neil Williams <codehelp@debian.org> | 2013-08-01 16:24:51 +0100 |
---|---|---|
committer | Neil Williams <codehelp@debian.org> | 2013-08-01 16:24:51 +0100 |
commit | 274665522d2a47d4b8cca5d6f75e55e4ea84d697 (patch) | |
tree | 2224371bc22ff0a3e81e334dc79b8d1f9d148abc /check_ip | |
parent | 75029d2f0314f17c0f3c93f22e8522e832faaef4 (diff) |
push more lava-network tests into level 3
Diffstat (limited to 'check_ip')
-rwxr-xr-x[-rw-r--r--] | check_ip | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,7 +1,17 @@ #!/bin/sh set -e - -for line in `grep ":ip=" /tmp/lava_multi_node_cache.txt |cut -d'=' -f2` ; do - ping -c1 -W1 ${line} +set -x +GREP="" +# if an argument is specified, use that to grep for this as a role +if [ "$1" != "" ]; then + GREP="|grep $1" +fi +# lava-group is tab separated +for line in `lava-group $GREP | cut -f1` ; do + # get the ipv4 for this device + STR=`lava-network query $line ipv4` + # strip off the prefix for ipv4 + DUT=`echo $STR | sed -e 's/^addr://'` + ping -c1 -W1 ${IP} done |