From 03b82bf1c80d57b0696d0182231efe9931b5db3e Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 13 Oct 2021 16:51:03 +0200 Subject: [PATCH] displays the location to help debug if there is a problem when launching the container --- lib/lxc.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/lxc.sh b/lib/lxc.sh index f7b3049..03fcb97 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -25,7 +25,12 @@ LXC_CREATE () { else log_critical "Can't find base image $LXC_BASE, run ./package_check.sh --rebuild" fi - [[ "${PIPESTATUS[0]}" -eq 0 ]] || exit 1 + + pipestatus="${PIPESTATUS[0]}" + location=$(lxc list --format json | jq -e --arg LXC_NAME $LXC_NAME '.[] | select(.name==$LXC_NAME) | .location' | tr -d '"') + [[ "$location" != "none" ]] && log_info "... on $location" + + [[ "$pipestatus" -eq 0 ]] || exit 1 _LXC_START_AND_WAIT $LXC_NAME set_witness_files