Renaming LH_MIRROR_BOOTSTRAP* to LH_MIRROR_CHROOT and introducing dedicated LH_MIRROR_BOOTSTRAP for debootstrap/cdebootstrap only.
This commit is contained in:
parent
fd315529e0
commit
c6fa0ca042
|
@ -277,10 +277,12 @@ Set_defaults ()
|
|||
esac
|
||||
fi
|
||||
|
||||
LH_MIRROR_CHROOT="${LH_MIRROR_CHROOT:-${LH_MIRROR_BOOTSTRAP}}"
|
||||
|
||||
# Setting security mirror to fetch packages from
|
||||
if [ -z "${LH_MIRROR_BOOTSTRAP_SECURITY}" ]
|
||||
if [ -z "${LH_MIRROR_CHROOT_SECURITY}" ]
|
||||
then
|
||||
LH_MIRROR_BOOTSTRAP_SECURITY="http://security.debian.org/"
|
||||
LH_MIRROR_CHROOT_SECURITY="http://security.debian.org/"
|
||||
fi
|
||||
|
||||
# Setting mirror which ends up in the image
|
||||
|
@ -462,7 +464,7 @@ Set_defaults ()
|
|||
# LH_TASKS
|
||||
|
||||
# Setting security updates option
|
||||
if [ "${LH_MIRROR_BOOTSTRAP_SECURITY}" = "none" ] || [ "${LH_MIRROR_BINARY_SECURITY}" = "none" ]
|
||||
if [ "${LH_MIRROR_CHROOT_SECURITY}" = "none" ] || [ "${LH_MIRROR_BINARY_SECURITY}" = "none" ]
|
||||
then
|
||||
LH_SECURITY="disabled"
|
||||
fi
|
||||
|
|
|
@ -212,7 +212,7 @@ then
|
|||
;;
|
||||
esac
|
||||
else
|
||||
URL="${LH_MIRROR_BOOTSTRAP}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
|
||||
URL="${LH_MIRROR_CHROOT}/dists/${LH_DISTRIBUTION}/main/installer-${LH_ARCHITECTURE}/current/images/"
|
||||
fi
|
||||
|
||||
# Downloading debian-installer
|
||||
|
@ -301,13 +301,13 @@ gzip -9 -c dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Packages > di
|
|||
cd "${OLDPWD}"
|
||||
|
||||
# Fetching release
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release -O binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/binary-"${LH_ARCHITECTURE}"/Release -O binary/dists/${LH_DISTRIBUTION}/main/binary-${LH_ARCHITECTURE}/Release
|
||||
|
||||
mkdir binary.udeb
|
||||
cd binary.udeb
|
||||
|
||||
# Downloading udeb indices
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/dists/"${LH_DISTRIBUTION}"/main/debian-installer/binary-"${LH_ARCHITECTURE}"/Packages.gz
|
||||
gunzip -c Packages.gz > Packages
|
||||
|
||||
# Sorting udebs
|
||||
|
@ -322,7 +322,7 @@ do
|
|||
cp ../cache/packages_debian-installer.udeb/"$(basename ${UDEB})" ./
|
||||
else
|
||||
# Downloading udebs
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_BOOTSTRAP}"/${UDEB}
|
||||
wget ${WGET_OPTIONS} "${LH_MIRROR_CHROOT}"/${UDEB}
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -50,22 +50,22 @@ case "${1}" in
|
|||
Create_lockfile .lock
|
||||
|
||||
# Configure custom sources.list
|
||||
echo "deb ${LH_MIRROR_BOOTSTRAP} ${LH_DISTRIBUTION} ${LH_SECTIONS}" > chroot/etc/apt/sources.list
|
||||
echo "deb ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" > chroot/etc/apt/sources.list
|
||||
|
||||
if [ "${LH_SOURCE}" = "enabled" ]
|
||||
then
|
||||
echo "deb-src ${LH_MIRROR_BOOTSTRAP} ${LH_DISTRIBUTION} ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
echo "deb-src ${LH_MIRROR_CHROOT} ${LH_DISTRIBUTION} ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
fi
|
||||
|
||||
if [ "${LH_SECURITY}" = "enabled" ]
|
||||
then
|
||||
if [ "${LH_DISTRIBUTION}" != "sid" ] && [ "${LH_DISTRIBUTION}" != "unstable" ]
|
||||
then
|
||||
echo "deb ${LH_MIRROR_BOOTSTRAP_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
echo "deb ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
|
||||
if [ "${LH_SOURCE}" = "enabled" ]
|
||||
then
|
||||
echo "deb-src ${LH_MIRROR_BOOTSTRAP_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
echo "deb-src ${LH_MIRROR_CHROOT_SECURITY} ${LH_DISTRIBUTION}/updates ${LH_SECTIONS}" >> chroot/etc/apt/sources.list
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -197,8 +197,8 @@ case "${1}" in
|
|||
if [ "${LH_BINARY_INDICES}" = "enabled" ]
|
||||
then
|
||||
# Don't do anything if it's not required
|
||||
if [ "${LH_MIRROR_BOOTSTRAP}" = "${LH_MIRROR_BINARY}" ] && \
|
||||
[ "${LH_MIRROR_BOOTSTRAP_SECURITY}" = "${LH_MIRROR_BINARY_SECURITY}" ]
|
||||
if [ "${LH_MIRROR_CHROOT}" = "${LH_MIRROR_BINARY}" ] && \
|
||||
[ "${LH_MIRROR_CHROOT_SECURITY}" = "${LH_MIRROR_BINARY_SECURITY}" ]
|
||||
then
|
||||
# Removing stage file
|
||||
rm -f .stage/chroot_sources
|
||||
|
|
|
@ -317,8 +317,13 @@ Local_arguments ()
|
|||
shift 2
|
||||
;;
|
||||
|
||||
--mirror-bootstrap-security)
|
||||
LH_MIRROR_BOOTSTRAP_SECURITY="${2}"
|
||||
--mirror-chroot)
|
||||
LH_MIRROR_CHROOT="${2}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
--mirror-chroot-security)
|
||||
LH_MIRROR_CHROOT_SECURITY="${2}"
|
||||
shift 2
|
||||
;;
|
||||
|
||||
|
@ -819,13 +824,17 @@ LH_BOOTSTRAP_KEYRING="${LH_BOOTSTRAP_KEYRING}"
|
|||
# (Default: ${LH_DISTRIBUTION})
|
||||
LH_DISTRIBUTION="${LH_DISTRIBUTION}"
|
||||
|
||||
# \$LH_MIRROR_BOOTSTRAP: set mirror to fetch packages from
|
||||
# \$LH_MIRROR_BOOTSTRAP: set mirror to boostrap from
|
||||
# (Default: ${LH_MIRROR_BOOTSTRAP})
|
||||
LH_MIRROR_BOOTSTRAP="${LH_MIRROR_BOOTSTRAP}"
|
||||
|
||||
# \$LH_MIRROR_BOOTSTRAP_SECURITY: set security mirror to fetch packages from
|
||||
# (Default: ${LH_MIRROR_BOOTSTRAP_SECURITY})
|
||||
LH_MIRROR_BOOTSTRAP_SECURITY="${LH_MIRROR_BOOTSTRAP_SECURITY}"
|
||||
# \$LH_MIRROR_CHROOT: set mirror to fetch packages from
|
||||
# (Default: ${LH_MIRROR_CHROOT})
|
||||
LH_MIRROR_CHROOT="${LH_MIRROR_CHROOT}"
|
||||
|
||||
# \$LH_MIRROR_CHROOT_SECURITY: set security mirror to fetch packages from
|
||||
# (Default: ${LH_MIRROR_CHROOT_SECURITY})
|
||||
LH_MIRROR_CHROOT_SECURITY="${LH_MIRROR_CHROOT_SECURITY}"
|
||||
|
||||
# \$LH_MIRROR_BINARY: set mirror which ends up in the image
|
||||
# (Default: ${LH_MIRROR_BINARY})
|
||||
|
|
Loading…
Reference in New Issue