#!/bin/sh
set -e

chroot_test() {
    echo
    echo "Installing Debian Edu chroot with profile $PROFILE and desktop $DESKTOP"
    echo
    cd $AUTOPKGTEST_TMP

    PROFILE=$PROFILE DESKTOP=$DESKTOP EDUSUITE=$edusuite \
        sh -x /usr/share/debian-edu-config/tools/debian-edu-bless 2>&1
}

# Use predictable language setting.
# FIXME should try several to check language specific setup
LC_ALL=C
export LC_ALL

# Undo the effect of libpam-tmpdir in case it is active, and use the
# test specific temp directory.
export TMP=$AUTOPKGTEST_TMP
export TMPDIR=$AUTOPKGTEST_TMP
export TEMP=$AUTOPKGTEST_TMP
export TEMPDIR=$AUTOPKGTEST_TMP

echo "info: File system status (/proc/mounts):"
cat /proc/mounts
echo

chroot_test
