#!/bin/sh -e
# TODO: move to tasksel
# Ask if tasksel should be run, and run it, queuing packages for install.
. /usr/share/debconf/confmodule

db_title 'Debian System Configuration'

if [ -x /usr/bin/tasksel ]; then
	# Always ask this, to give users a choice each time..
	db_fset base-config/run-tasksel seen false
	db_input medium base-config/run-tasksel || true
	db_go || true
	db_get base-config/run-tasksel
	if [ "$RET" = true ]; then
		(
			clear
			tasksel -riqs || true
			clear
		) >/dev/tty </dev/tty
	else
		# Default the run dselect question to true.
		db_set base-config/run-dselect true
	fi
fi
