#!/bin/sh -e
# Run eximconfig, if exim does not yet have a valid config file, and exim
# is still installed (the user may have switched to a different MTA by this
# point.
#
# FIXME: I hate this. Exim should not be in the base system debootstrap
# installs, but it must be, because cron depends on logrotate, which depends
# on mailx, which depends on a MTA. Also, exim does not yet use debconf, so 
# we lose GUI consistency here (well, we lost it during the apt-get run
# too, probably).

if [ ! -s /etc/exim/exim.conf -a -x /usr/sbin/eximconfig ]; then
	# Zero byte files confuse eximconfig.
	rm -f /etc/exim/exim.conf
	clear
	/usr/sbin/eximconfig
	clear
fi

