summaryrefslogtreecommitdiffstats
path: root/controller/libexec/dtf-wait-for-ssh
diff options
context:
space:
mode:
Diffstat (limited to 'controller/libexec/dtf-wait-for-ssh')
-rwxr-xr-xcontroller/libexec/dtf-wait-for-ssh11
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