upgraded KVM test suite to Linux 3.8 kernel
[strongswan.git] / testing / ssh
1 #!/bin/bash
2
3 DIR=$(dirname `readlink -f $0`)
4 . $DIR/testing.conf
5
6 if [ $# == 0 ]
7 then
8         echo "$0 <host>"
9         exit 1
10 fi
11
12 host=$1
13 ip="`echo $HOSTNAMEIPV4 | sed -n -e "s/^.*${host},//gp" | awk -F, '{ print $1 }' | awk '{ print $1 }'`"
14 if [ -z $ip ]
15 then
16         echo "Host '$host' unknown"
17         exit 1
18 fi
19
20 exec ssh $SSHCONF -q root@$ip