#!/bin/sh
#
# This script is executed within the debian-installer environment when
# pre-pkgsel.d is executed, which is executed before tasksel is
# started.

set -e

. /usr/share/debconf/confmodule

log() {
    logger -t debian-edu-config-pre-pkgsel "$@"
}

db_get debian-edu-install/profile
PROFILE="$RET"

for p in $(echo $PROFILE | tr , " ") ; do
    case $p in
	# Only do this for the networked tasks, not for standalone
	Main-Server|Workstation|Roaming-Workstation|Thin-Client-Server|Minimal)
	    in-target /usr/share/debian-edu-config/tools/preseed-ldap-kerberos
	    in-target /usr/share/debian-edu-config/tools/preseed-sitesummary
	    ;;
    esac
done
