svn commit: r483437 - in head/mail/dovecot: . files

Hans Ottevanger hans at beastielabs.net
Tue Oct 30 09:28:54 UTC 2018


On 10/30/18 12:28 AM, Larry Rosenman wrote:
> Author: ler
> Date: Mon Oct 29 23:28:26 2018
> New Revision: 483437
> URL: https://svnweb.freebsd.org/changeset/ports/483437
> 
> Log:
>    mail/dovecot: give better error message(s) when there are configuration errors.
>    
>    PR:		232785
>    Submitted by:	prj at rootwyrm.com
> 
> Modified:
>    head/mail/dovecot/Makefile
>    head/mail/dovecot/files/dovecot.in
> 
> Modified: head/mail/dovecot/Makefile
> ==============================================================================
> --- head/mail/dovecot/Makefile	Mon Oct 29 23:25:58 2018	(r483436)
> +++ head/mail/dovecot/Makefile	Mon Oct 29 23:28:26 2018	(r483437)
> @@ -8,7 +8,7 @@
>   
>   PORTNAME=	dovecot
>   PORTVERSION=	2.3.3
> -PORTREVISION=	2
> +PORTREVISION=	3
>   CATEGORIES=	mail ipv6
>   MASTER_SITES=	https://www.dovecot.org/releases/2.3/
>   
> 
> Modified: head/mail/dovecot/files/dovecot.in
> ==============================================================================
> --- head/mail/dovecot/files/dovecot.in	Mon Oct 29 23:25:58 2018	(r483436)
> +++ head/mail/dovecot/files/dovecot.in	Mon Oct 29 23:28:26 2018	(r483437)
> @@ -60,6 +60,14 @@ for config in ${dovecot_config}; do
>   	required_files="${config}"
>   	command_args="-c ${config}"
>   	if [ -s ${config} ]; then
> +               ${command} ${command_args} -a 2>/dev/null
> +                if [ $? -ne 0 ]; then
> +                       echo "==Error=="
> +                       echo "Configuration file check failed."
> +                       # Use dovecot to print the config error.
> +                       ${command} ${command_args} -a
> +                       exit $?
> +                fi
>   		base_dir=$(${command} ${command_args} -a 2>/dev/null | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')
>   		pidfile="${base_dir}/master.pid"
>   	else
> _______________________________________________
> svn-ports-all at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-ports-all
> To unsubscribe, send any mail to "svn-ports-all-unsubscribe at freebsd.org"
> 

Hi,

This change causes every invocation of /usr/local/etc/rc.d/dovecot to 
unnecessarily spit out the configuration info to stdout . This can be 
prevented by also redirecting stdout, i.e. adding ">/dev/null" in the 
first added line.

Kind regards,

Hans Ottevanger


More information about the svn-ports-all mailing list