#!/bin/sh
set -e
CONFFILE=/etc/default/racoon

# Source debconf library.
. /usr/share/debconf/confmodule
 
CONFIG_MODE=""

if test -e "$CONFFILE"; then
	. "$CONFFILE"

	# Guard against admin writing silly things into the
	# config file...
	if test "$CONFIG_MODE" != "racoon-tool"; then 
		db_set racoon/config_mode "direct"
	else
		db_set racoon/config_mode "racoon-tool"
	fi
	
fi

# Setup and select the configuration mode
db_input high racoon/config_mode || true
db_go

