#!/bin/sh

set -e

# Enable debconf
. /usr/share/debconf/confmodule

# Make it possible to activate etcinsvk using preseeding.
# First check the old template to be compatible with the value used in
# debian-edu-config version X.
db_get debian-edu-config/etc-in-svk
OLD="$RET"
# Next, check the new template
db_get etcinsvk/enabled
if [ true = "$OLD" ] || [ true = "$RET" ] ; then
    if [ ! -d ~root/.svk ] ; then
	etcinsvk init > /dev/null || true
    else
	etcinsvk ignore mtab > /dev/null || true
    fi
fi

#DEBHELPER#
