#!/usr/bin/perl -w
# This is a sample config module. It approximates 
# the questions asked by eximconfig. TODO: finish

use Debian::DebConf::Client::ConfModule ':all';

# Establish the preliminaries.
my $version=version;
my $capb=capb('backup');
title('Exim Configuration');
input('medium', 'exim/intro');

sub get_type () {
	input('medium', 'exim/system_type');
	my $ret=go;

	# Going back at this point is up to the frontend,
	# since it involves jumping out of this configmodule.
	if ( $ret eq "back") {
		# This is just a placeholder for something not in the spec.
		previous_module;
		exit;
	}

	my $systype=get('exim/system_type');

	# Check to see if they want to skip configuration, if so
	# give them the warning and quit.
	if ($systype eq "no configuration") {
		input('high', 'exim/noconfiguration');
		go;
		exit;
	}
}

# This launches the whole thing.
get_type();
