#!/bin/sh
set -e

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

    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=$ADTTMP
export TMPDIR=$ADTTMP
export TEMP=$ADTTMP
export TEMPDIR=$ADTTMP

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

chroot_test
