diff options
author | Ross Burton <ross.burton@intel.com> | 2013-04-05 16:35:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-04-05 17:36:34 +0100 |
commit | 4b5001de2f5303523e0b40fa30484f37c7c48564 (patch) | |
tree | 724fbd851474b966619551d4ad1b29c90f828f8c /scripts/qemuimage-testlib | |
parent | 3328d7c3f7140f4fcfb1491bbd1855788dac6410 (diff) | |
download | poky-4b5001de2f5303523e0b40fa30484f37c7c48564.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: 24e4a570eb527cff017386976296d5747c1adf57)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/qemuimage-testlib')
-rwxr-xr-x | scripts/qemuimage-testlib | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib index 22e2d4168f..daa1ac0605 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 |
93 | eval spawn scp -o UserKnownHostsFile=$tmpfile "$src" root@$ip_addr:"$des" | 92 | eval spawn scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$src" root@$ip_addr:"$des" |
94 | set timeout $time_out | 93 | set timeout $time_out |
95 | expect { | 94 | expect { |
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 |
124 | eval spawn ssh -o UserKnownHostsFile=$tmpfile root@$ip_addr "$command" | 121 | eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command" |
125 | set timeout $time_out | 122 | set timeout $time_out |
126 | expect { | 123 | expect { |
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 | ||