# Create coriolis chroot dir in /opt
mkdir -p /opt/chroot/coriolis
+# argh apt with broken proxies and unreliable ISPs, getting fed up with it
+cat <<EOF >/tmp/brokenproxy
+APT::Acquire::Retries "20";
+APT::Get::Fix-Broken "true";
+Acquire::http::Pipeline-Depth "0";
+Acquire::http::No-Cache=True;
+Acquire::BrokenProxy=true;
+EOF
+
echo "adding retries for debootstrap to not fail"
-echo 'APT::Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
-echo 'APT::Acquire::Retries "10";' > /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
# Install debootstrap and schroot via apt
apt install -y debootstrap schroot
# Create coriolis chroot dir in /opt
mkdir /opt/chroot/$chrootdir
-echo "adding retries for debootstrap to not fail"
-echo 'APT::Acquire::Retries "10";' > /etc/apt/apt.conf.d/80-retries
-echo 'APT::Acquire::Retries "10";' > /opt/chroot/$chrootdir/etc/apt/apt.conf.d/80-retries
+# argh apt with broken proxies and unreliable ISPs, getting fed up with it
+cat <<EOF >/tmp/brokenproxy
+APT::Acquire::Retries "20";
+APT::Get::Fix-Broken "true";
+Acquire::http::Pipeline-Depth "0";
+Acquire::http::No-Cache=True;
+Acquire::BrokenProxy=true;
+EOF
+
+cp /tmp/brokenproxy /etc/apt/apt.conf.d/80-retries
+cp /tmp/brokenproxy /opt/chroot/coriolis/etc/apt/apt.conf.d/80-retries
# Install debootstrap and schroot
if [ -e /etc/debian_version ]; then