From owner-svn-ports-head@freebsd.org Mon Oct 29 23:28:28 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 080E010ED4DD; Mon, 29 Oct 2018 23:28:28 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A557B8A7A9; Mon, 29 Oct 2018 23:28:27 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 85C0015245; Mon, 29 Oct 2018 23:28:27 +0000 (UTC) (envelope-from ler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w9TNSRg0018032; Mon, 29 Oct 2018 23:28:27 GMT (envelope-from ler@FreeBSD.org) Received: (from ler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w9TNSRHm018030; Mon, 29 Oct 2018 23:28:27 GMT (envelope-from ler@FreeBSD.org) Message-Id: <201810292328.w9TNSRHm018030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ler set sender to ler@FreeBSD.org using -f From: Larry Rosenman Date: Mon, 29 Oct 2018 23:28:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r483437 - in head/mail/dovecot: . files X-SVN-Group: ports-head X-SVN-Commit-Author: ler X-SVN-Commit-Paths: in head/mail/dovecot: . files X-SVN-Commit-Revision: 483437 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 23:28:28 -0000 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@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