fi
set -x
+
+cleanup() { pxe-server :; }
+pxe-server fai $host
+
+
if $reboot; then
# untested, this caused hang using here doc.
- ssh $host "touch /tmp/keyscript-off; sudo reboot" ||:
+ ssh $host "touch /tmp/keyscript-off; sudo reboot" ||: &
fi
-cleanup() { pxe-server :; }
-pxe-server -a fai $host
+pxe-server -a :
cleanup() { :; }
-timedout=true
+error=true
for ((i=0; i<240; i++)); do
if timeout -s 9 10 ssh $host :; then
- timedout=false
+ error=false
break
fi
sleep 5
done
-if $timeout; then
+if $error; then
echo "$0: error: timeout"
exit 1
fi