Skip to content
Snippets Groups Projects
Commit 50e8e7af authored by David Beniamine's avatar David Beniamine
Browse files

Avoid upgrade on wait

parent ec5d7387
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,23 @@ done < <($catcmd)
log "Wakeonlan sent, waiting"
while [ $wait_time -gt 0 ]
do
if [ ! -z "$host" ]
then
leave=false
# try to skip useless wait for single upgrade
for ip in $(getips $MACS)
do
ping -c 3 $ip
if [ $? -eq 0 ]
then
leave=true
fi
done
if $leave
then
break
fi
fi
log -ne "Waiting for boot, remaining $wait_time seconds\r"
sleep $wait_step
wait_time=$(($wait_time - $wait_step))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment