summaryrefslogtreecommitdiff
path: root/auto/functions/prepare-chroot-sources-list-hook
blob: a7f8734ef36777f2e22ad9ab7feca6ac9af47225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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