summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-04-05 15:35:29 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-23 12:00:54 (GMT)
commit1d58c4b99e1a0585c1936f0eb056dbe05b45a695 (patch)
tree61d6fb01ac439b134228e69d1134a1bd9f9e6aee
parent2a320d9b747913350b27ba8050f32661c9da360c (diff)
downloadpoky-1d58c4b99e1a0585c1936f0eb056dbe05b45a695.tar.gz
qemuimage-testlib: silence some key warnings
Set StrictHostKeyChecking to no to silence the fingerprint warnings, and instead of creating a temporary file for the known hosts and then deleting it just use /dev/null. (From OE-Core rev: b4fe96393912377cd003af8c72557df3448cde86) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/qemuimage-testlib8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 22e2d41..daa1ac0 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -84,13 +84,12 @@ Test_SCP()
84 local ip_addr=$1 84 local ip_addr=$1
85 local src=$2 85 local src=$2
86 local des=$3 86 local des=$3
87 local tmpfile=`mktemp`
88 local time_out=60 87 local time_out=60
89 local ret=0 88 local ret=0
90 89
91 # We use expect to interactive with target by ssh 90 # We use expect to interactive with target by ssh
92 local exp_cmd=`cat << EOF 91 local exp_cmd=`cat << EOF
93eval spawn scp -o UserKnownHostsFile=$tmpfile "$src" root@$ip_addr:"$des" 92eval spawn scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$src" root@$ip_addr:"$des"
94set timeout $time_out 93set timeout $time_out
95expect { 94expect {
96 "*assword:" { send "\r"; exp_continue} 95 "*assword:" { send "\r"; exp_continue}
@@ -107,7 +106,6 @@ EOF`
107 106
108 expect -c "$exp_cmd" 107 expect -c "$exp_cmd"
109 ret=$? 108 ret=$?
110 rm -rf $tmpfile
111 return $ret 109 return $ret
112} 110}
113 111
@@ -117,11 +115,10 @@ Test_SSH()
117 local ip_addr=$1 115 local ip_addr=$1
118 shift 116 shift
119 local command=$@ 117 local command=$@
120 local tmpfile=`mktemp`
121 local time_out=60 118 local time_out=60
122 local ret=0 119 local ret=0
123 local exp_cmd=`cat << EOF 120 local exp_cmd=`cat << EOF
124eval spawn ssh -o UserKnownHostsFile=$tmpfile root@$ip_addr "$command" 121eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command"
125set timeout $time_out 122set timeout $time_out
126expect { 123expect {
127 "*assword:" { send "\r"; exp_continue} 124 "*assword:" { send "\r"; exp_continue}
@@ -138,7 +135,6 @@ EOF`
138 135
139 expect -c "$exp_cmd" 136 expect -c "$exp_cmd"
140 ret=$? 137 ret=$?
141 rm -rf $tmpfile
142 return $ret 138 return $ret
143} 139}
144 140