if [ -n "$ISO" ] ; then
echo "deb $ISO $RELEASE main contrib" > /etc/apt/sources.list
[ -n "$CHROOTMIRROR" ] && echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" >> /etc/apt/sources.list
if [ -n "$ISO" ] ; then
echo "deb $ISO $RELEASE main contrib" > /etc/apt/sources.list
[ -n "$CHROOTMIRROR" ] && echo "deb $CHROOTMIRROR $RELEASE main contrib non-free" >> /etc/apt/sources.list
# make sure we have the keys available for aptitude
gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
gpg --export F61E2E7CECDEA787 | apt-key add - || /bin/true # not yet sure
# make sure we have the keys available for aptitude
gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
gpg --export F61E2E7CECDEA787 | apt-key add - || /bin/true # not yet sure
packages() {
# Pre-seed the debconf database with answers. Each question will be marked
# as seen to prevent debconf from asking the question interactively.
packages() {
# Pre-seed the debconf database with answers. Each question will be marked
# as seen to prevent debconf from asking the question interactively.
if [ -n "$HOSTNAME" ] ; then
echo "Setting hostname to ${HOSTNAME}."
echo "$HOSTNAME" > /etc/hostname
if [ -n "$HOSTNAME" ] ; then
echo "Setting hostname to ${HOSTNAME}."
echo "$HOSTNAME" > /etc/hostname