#! /bin/sh -e
#
# Last finishing touch before rebooting into the installed system.

. /usr/share/debconf/confmodule

# Stop automatic lvm resize script
rm -f /target/debian-edu-extend-file-systems

register_changes() {
    [ -x /target/usr/sbin/etcinsvk ] && \
      in-target /usr/sbin/etcinsvk update || true
}

db_get mirror/protocol || true
PROTOCOL="$RET"
if [ "$PROTOCOL" = "http" ]; then
    db_get mirror/http/proxy
    http_proxy="$RET" || true
    if [ "$http_proxy" ]; then
	export http_proxy
    fi
fi

# Register changes before and after cfengine is executed, to make it
# easier to track our changes
register_changes

# Update configuration for everything that could not be preseeded
in-target cfengine-debian-edu -D installation || true

register_changes

exit 0
