From 9d57032b892e1bc7b6f7cad1faec8344eea71b96 Mon Sep 17 00:00:00 2001 From: tabris Date: Thu, 23 Oct 2025 12:03:20 -0400 Subject: [PATCH] build framework - MANAGE_ACNG, allow to specify your own mirror/URL --- lib/functions/rootfs/rootfs-create.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/functions/rootfs/rootfs-create.sh b/lib/functions/rootfs/rootfs-create.sh index 0f0ab03749..dd3e1f1a7e 100644 --- a/lib/functions/rootfs/rootfs-create.sh +++ b/lib/functions/rootfs/rootfs-create.sh @@ -53,6 +53,15 @@ function create_new_rootfs_cache_via_debootstrap() { if [[ "${MANAGE_ACNG}" == "yes" ]]; then local debootstrap_apt_mirror="http://localhost:3142/${APT_MIRROR}" acng_check_status_or_restart + elif [[ "${MANAGE_ACNG}" == "no" ]]; then + : # do nothing + else + if [[ ! "${MANAGE_ACNG}" =~ ^https?:// ]]; then + exit_with_error "MANAGE_ACNG must be yes/no OR be a full URL with http/https" "${MANAGE_ACNG}" + else + # FIXME: although this works with mmdebstrap, there's a more idiomatic way with `--aptopt` + local debootstrap_apt_mirror="${MANAGE_ACNG}/${APT_MIRROR}" + fi fi # @TODO: one day: https://gitlab.mister-muffin.de/josch/mmdebstrap/src/branch/main/mmdebstrap