change connection test to try binding to tcp/22 instead of ping (icmp)

we want to test if ssh is about to be able to work, so actually testing
if there's an ssh server on the port should help the run condition caused
by of ssh not being up the same instant as networking.
This commit is contained in:
ida schmidt 2025-03-30 23:11:16 +01:00
parent 9d9451da98
commit a9415273bc

View file

@ -20,8 +20,8 @@ fi
versionprompt
echo -n "Waiting for machine to respond"
# send pings every second, waiting for 1 second
until ping -w 1 -c 1 $ipv4_address >/dev/null 2>&1; do
# tests if ssh is up, waiting one second between attempts
until nc $ipv4_address 22 <<<'' | grep -q 'SSH'; do
echo -n '.'
sleep 1
done