diff options
Diffstat (limited to 'controller/libexec/dtf-wait-for-ssh')
-rwxr-xr-x | controller/libexec/dtf-wait-for-ssh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/controller/libexec/dtf-wait-for-ssh b/controller/libexec/dtf-wait-for-ssh new file mode 100755 index 0000000..eb3880a --- /dev/null +++ b/controller/libexec/dtf-wait-for-ssh @@ -0,0 +1,11 @@ +#!/bin/bash -x + +where="$1" + +test -z "$where" && echo >&2 "no host specified" && exit 1 + +while [ 1 ]; do + ssh -o StrictHostKeyChecking=no -q $where exit &>/dev/null && exit 0 +done + +exit 1 |