X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=vm;h=3e94cb753fc756aa0f2c56d1b1ff4361dc6934be;hp=14f24837c037fec4bdb8d2afe32a5e9e99c618d8;hb=d9a6587d6b86ba5a35291a85f84fcda1c2099ba2;hpb=a62d9c01805afce7e182bd0aed88b245fbadd2ee diff --git a/vm b/vm index 14f2483..3e94cb7 100755 --- a/vm +++ b/vm @@ -5,7 +5,7 @@ image="$1" shift # determine ssh forward port ssh_port=22000 -while echo '' | nc localhost $ssh_port >/dev/null; do +until echo '' | nc localhost $ssh_port 2>&1 >/dev/null | grep -q 'Connection refused'; do ssh_port=$((ssh_port+1)) done echo "Host ssh port: $ssh_port"