From f96533e91e3c18123c59a19d88e09df2ecc434f4 Mon Sep 17 00:00:00 2001 From: ArchemedIan <105951210+ArchemedIan@users.noreply.github.com> Date: Sat, 2 Sep 2023 07:35:07 -0400 Subject: [PATCH] Update create_lxc.sh --- ct/create_lxc.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/ct/create_lxc.sh b/ct/create_lxc.sh index 96cebad7..eecfb055 100644 --- a/ct/create_lxc.sh +++ b/ct/create_lxc.sh @@ -122,11 +122,16 @@ if pct status $CTID &>/dev/null; then unset CTID exit "Cannot use ID that is already in use." fi - +if [ "$(dpkg --print-architecture)" = "arm64" ]; then + arm64ct="yes" +else + arm64ct="no" +fi # Get template storage -TEMPLATE_STORAGE=$(select_storage template) || exit -msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage." - +if [ "$arm64ct" != "yes" ]; then + TEMPLATE_STORAGE=$(select_storage template) || exit + msg_ok "Using ${BL}$TEMPLATE_STORAGE${CL} ${GN}for Template Storage." +fi # Get container storage CONTAINER_STORAGE=$(select_storage container) || exit msg_ok "Using ${BL}$CONTAINER_STORAGE${CL} ${GN}for Container Storage." @@ -137,13 +142,9 @@ pveam update >/dev/null msg_ok "Updated LXC Template List" -if [ "$(dpkg --print-architecture)" = "arm64" ]; then - arm64ct="yes" -else - arm64ct="no" -fi -if [ "$(dpkg --print-architecture)" = "yes" ]; then + +if [ "$arm64ct" = "yes" ]; then msg_info "Arm64 Detected" msg_info "Downloading LXC Template" pvesm add dir ctgrabtmp -content vztmpl -path /tmp/ctgrabtmp