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