#!/bin/sh

set -x

# temporarily disable temparchive.list, will resotre it back (LP: 1790566)
mv /etc/apt/sources.list.d/temparchive.list /etc/apt/sources.list.d/temparchive

# Preeseed apt cache (LP: #1005342)
if $(ping -q -c 1 -W 1 8.8.8.8 >/dev/null); then
    /usr/share/volatile/aptUpdate || true
fi


mv /etc/apt/sources.list.d/temparchive /etc/apt/sources.list.d/temparchive.list
exit 0
