summaryrefslogtreecommitdiff
path: root/auto/functions/prepare-chroot-sources-list-hook
diff options
context:
space:
mode:
authorHolger Paradies <retabell@gmx.de>2021-04-01 21:23:00 +0200
committerHolger Paradies <retabell@gmx.de>2021-04-02 19:23:24 +0200
commit382df6c7144398a65779657a840d1e414b39069c (patch)
treed6c2a5073cbda3308fa02fd4aa5de7758c08f5e3 /auto/functions/prepare-chroot-sources-list-hook
parent6e88277b0b9b45bb82c5c64e6c3b3f1682691443 (diff)
downloadkanotix-382df6c7144398a65779657a840d1e414b39069c.zip
kanotix-382df6c7144398a65779657a840d1e414b39069c.tar.gz
Hook: prepare chroot sources.list
Diffstat (limited to 'auto/functions/prepare-chroot-sources-list-hook')
-rw-r--r--auto/functions/prepare-chroot-sources-list-hook33
1 files changed, 33 insertions, 0 deletions
diff --git a/auto/functions/prepare-chroot-sources-list-hook b/auto/functions/prepare-chroot-sources-list-hook
new file mode 100644
index 0000000..a7f8734
--- /dev/null
+++ b/auto/functions/prepare-chroot-sources-list-hook
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+current_script="$(basename "$0"|sed 's/^lb_//')"
+
+if [ "$current_script" = "chroot_includes" ]; then
+
+# Including common functions
+[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" ||
+
+# Reading configuration files
+Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
+Set_defaults
+
+ echo "HOOK: prepare chroot sources.list"
+
+ if [ "${_KVERBOSE}" = "true" ]; then
+ echo "DEBUG: LB_APT_HTTP_PROXY ${LB_APT_HTTP_PROXY}"
+ echo "DEBUG: LB_APT_FTP_PROXY ${LB_APT_FTP_PROXY}"
+ echo "DEBUG: DEBOOTSTRAP_OPTIONS ${DEBOOTSTRAP_OPTIONS}"
+ echo "DEBUG: LB_PARENT_DISTRIBUTION ${LB_PARENT_DISTRIBUTION}"
+ echo "DEBUG: LB_PARENT_MIRROR_BOOTSTRAP ${LB_PARENT_MIRROR_BOOTSTRAP}"
+ echo "DEBUG: LB_DISTRIBUTION ${LB_DISTRIBUTION}"
+ echo "DEBUG: LB_PARENT_MIRROR_CHROOT ${LB_PARENT_MIRROR_CHROOT}"
+ echo "DEBUG: LB_PARENT_MIRROR ${LB_PARENT_MIRROR}"
+ echo "DEBUG: LB_MIRROR_CHROOT ${LB_MIRROR_CHROOT}"
+ echo "DEBUG: LB_PARENT_MIRROR_BINARY ${LB_PARENT_MIRROR_BINARY}"
+ fi
+
+ if [ -e config/chroot_local-includes/etc/apt/sources.list ]; then
+ echo "Sources.list found"
+ sed -i -e "s#@MIRRORDUMMY@#${LB_MIRROR_CHROOT}#"g config/chroot_local-includes/etc/apt/sources.list
+ fi
+fi