#!/bin/sh
# Return true if this is a Debian Edu test install, and false if it
# isn't.
. /usr/share/debconf/confmodule

db_get cdrom/codename || true
CDDISTRIBUTION="$RET"

db_get mirror/distribution || true
DISTRIBUTION="$RET"

if [ -f /tmp/debian-edu-profile-udeb-testinstall ] || \
   grep -q testinstall /proc/cmdline ; then
    logger -t edu-is-testinstall "detected test install"
    touch /tmp/debian-edu-profile-udeb-testinstall
    exit 0
else
    logger -t edu-is-testinstall "detected production install"
    exit 1
fi
