#!/bin/sh
# Debconf config script for cyrus-sasl2
# Copyright (c) 2007 by Fabian Fagerholm <fabbe@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Note that Cyrus SASL itself is published under a different license.

set -e

# Debconf hook.
. /usr/share/debconf/confmodule

case "$1" in
	configure)
		ok=''
		while [ ! "$ok" ]; do
			db_input medium cyrus-sasl2/backup-sasldb2 || true
			db_go

			db_get cyrus-sasl2/backup-sasldb2
			if [ "$RET" ]; then
				ok=1
			fi
		done
		;;
	reconfigure)
		;;
	*)
		echo "config called with unknown argument $1" >&2
		exit 0
esac

exit 0
