X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=dsfull;h=29946f39804b3cfccbc7378fba17656167d207a0;hb=d29d21017de635db1d05769144db56f44addd055;hp=40c933ca9c255f760aa7989f8193d8bbda85d8f3;hpb=c820c35e71e31c33de6743f8d225f7c5cd71a70f;p=automated-distro-installer diff --git a/dsfull b/dsfull index 40c933c..29946f3 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 @@ -32,8 +30,9 @@ Note: relies on other repos and paths specific to Ian's system. Note: disables btrbk.timer. If it was active before, it should be manual reenabled after completion. ---no-r Don't ssh to host and reboot. -k ssh to host and kexec, don't use pxe. implies --no-r +--no-r Don't ssh to host and reboot. Use this for when you are + booting or rebooting from some other means. -h|--help Print help and exit. Note: Uses GNU getopt options parsing style @@ -72,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 @@ -81,7 +80,7 @@ else fi e pxe-server -a - cleanup() { :; } + unset _errcatch_cleanup fi error=true @@ -101,4 +100,5 @@ while [[ $(ser is-active btrbk.service) == active ]]; do sleep 5 done e btrbk-run -t $host -e dsremote $host +ssh $host /a/bin/distro-setup/distro-begin +#e dsremote $host