--- courier-imap.orig 2008-09-07 23:15:10.000000000 -0300 +++ courier-imap 2009-02-12 03:32:25.793685628 -0200 @@ -1,16 +1,25 @@ CI_DAEMONS= [ -f /etc/conf.d/courier-imap ] && . /etc/conf.d/courier-imap +[ -z $AUTO_AUTHDAEMON_LAG ] && AUTO_AUTHDAEMON_LAG=2 . /etc/rc.conf . /etc/rc.d/functions case "$1" in start) + if [ ${AUTO_AUTHDAEMON="true"} ]; then + /etc/rc.d/authdaemond start + sleep ${AUTO_AUTHDAEMON_LAG} + fi if [ ! -f /var/run/daemons/authdaemond ]; then echo "ERROR: authdaemond is not running" stat_fail exit 1 fi + if [ ! -d /var/run/courier ]; then + mkdir /var/run/courier + chown courier:courier /var/run/courier + fi for daemon in $CI_DAEMONS; do stat_busy "Starting Courier ${daemon}" /usr/lib/courier-imap/${daemon}.rc start