#!/bin/sh

set -e

. /usr/share/debconf/confmodule

if [ -f /etc/dbconfig-common/config ]; then
	. /etc/dbconfig-common/config
	if [ "$dbc_remember_admin_pass" = "true" ]; then
		db_set dbconfig-common/remember-admin-pass "true"
	else
		db_set dbconfig-common/remember-admin-pass "false"
	fi
	if [ "$dbc_remote_questions_default" = "true" ]; then
		db_set dbconfig-common/remote-questions-default "true"
	else
		db_set dbconfig-common/remote-questions-default "false"
	fi
fi

db_input low dbconfig-common/remember-admin-pass || true
db_input low dbconfig-common/remote-questions-default || true

db_go
