# See the License for the specific language governing permissions and
# limitations under the License.
-set -eE -o pipefail
-cleanup() { :; }
-trap 'cleanup; echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace"
reboot=true
if [[ $1 == -r ]]; then
e myfai-chboot $host
e fai-kexec $host ||:
else
- cleanup() { pxe-server; }
+ cleanup() { pxe-server; }; _errcatch_cleanup=cleanup
e pxe-server $host fai
if $reboot; then
fi
e pxe-server -a
- cleanup() { :; }
+ unset _errcatch_cleanup
fi
error=true
done
e btrbk-run -t $host
ssh $host /a/bin/distro-setup/distro-begin
+# this should be done instead of distro-begin, but
+# keeping it to 2 steps for now
#e dsremote $host