X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=dsfull;h=df9c398f2936f8b8f27c6708016982ff13428030;hb=bacafbabe07c9edc86eaa75c24887d6fac0c310a;hp=417635014c3d8413649d7c03bb9c2ac9b92e7163;hpb=efcfb463ceda4de1d9953da31a2c0737471e5cf8;p=automated-distro-installer diff --git a/dsfull b/dsfull index 4176350..df9c398 100755 --- a/dsfull +++ b/dsfull @@ -13,9 +13,7 @@ # 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 @@ -73,7 +71,7 @@ if $kexec; 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 @@ -82,7 +80,7 @@ else fi e pxe-server -a - cleanup() { :; } + unset _errcatch_cleanup fi error=true @@ -103,4 +101,6 @@ while [[ $(ser is-active btrbk.service) == active ]]; do 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