diff options
-rwxr-xr-x | scripts/qemuimage-testlib | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib index 1fa9b4edbd..475231bbc4 100755 --- a/scripts/qemuimage-testlib +++ b/scripts/qemuimage-testlib | |||
@@ -144,10 +144,15 @@ EOF` | |||
144 | # function to run command in $ip_addr via ssh | 144 | # function to run command in $ip_addr via ssh |
145 | Test_SSH() | 145 | Test_SSH() |
146 | { | 146 | { |
147 | local ip_addr=$1 | 147 | local ip_addr="$1" |
148 | shift | 148 | local command="$2" |
149 | local command=$@ | 149 | |
150 | local time_out=60 | 150 | if [ $# -eq 3 ]; then |
151 | local time_out=$3 | ||
152 | else | ||
153 | local time_out=60 | ||
154 | fi | ||
155 | |||
151 | local ret=0 | 156 | local ret=0 |
152 | local exp_cmd=`cat << EOF | 157 | local exp_cmd=`cat << EOF |
153 | eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command" | 158 | eval spawn ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@$ip_addr "$command" |