do not use apt proxy during no-network install

This commit is contained in:
Michael Hudson-Doyle 2019-04-11 10:59:13 +12:00
parent 2edf1497dd
commit a8e153b896
1 changed files with 3 additions and 0 deletions

View File

@ -49,6 +49,7 @@ setup_overlay () {
setup_overlay $TARGET_MOUNT_POINT/etc/apt
mount -t tmpfs tmpfs "$TARGET_MOUNT_POINT/run"
mkdir -p "$TARGET_MOUNT_POINT/run/cdrom"
mount --bind /cdrom "$TARGET_MOUNT_POINT/run/cdrom"
@ -56,6 +57,8 @@ mount --bind /cdrom "$TARGET_MOUNT_POINT/run/cdrom"
if [ $HAS_NETWORK = 'true' ]; then
mv "$TARGET_MOUNT_POINT/etc/apt/sources.list" "$TARGET_MOUNT_POINT/etc/apt/sources.list.d/original.list"
else
# Do not use the configured proxy during the install if one was configured.
rm -f $TARGET_MOUNT_POINT/etc/apt/apt.conf.d/90curtin-aptproxy
setup_overlay $TARGET_MOUNT_POINT/var/lib/apt/lists
fi