From: Ian Kelling Date: Fri, 2 Sep 2016 11:06:08 +0000 (-0700) Subject: fix dsfull X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=commitdiff_plain;h=46edfde8e1fbb4121d5d0661946fc419d042543d fix dsfull --- diff --git a/dsfull b/dsfull index 1fea3bc..a8a2f1f 100755 --- a/dsfull +++ b/dsfull @@ -21,24 +21,28 @@ if [[ ! $host || $host == -h ]]; then 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