Commit 50e8e7af authored by David Beniamine's avatar David Beniamine
Browse files

Avoid upgrade on wait

parent ec5d7387
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment