From owner-svn-ports-head@FreeBSD.ORG Fri Feb 13 11:52:23 2015 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C364143; Fri, 13 Feb 2015 11:52:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F59389; Fri, 13 Feb 2015 11:52:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DBqNhP027466; Fri, 13 Feb 2015 11:52:23 GMT (envelope-from ashish@FreeBSD.org) Received: (from ashish@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DBqN2H027463; Fri, 13 Feb 2015 11:52:23 GMT (envelope-from ashish@FreeBSD.org) Message-Id: <201502131152.t1DBqN2H027463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ashish set sender to ashish@FreeBSD.org using -f From: Ashish SHUKLA Date: Fri, 13 Feb 2015 11:52:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r378922 - in head/mail/opensmtpd: . files X-SVN-Group: ports-head 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.18-1 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: Fri, 13 Feb 2015 11:52:23 -0000 Author: ashish Date: Fri Feb 13 11:52:22 2015 New Revision: 378922 URL: https://svnweb.freebsd.org/changeset/ports/378922 QAT: https://qat.redports.org/buildarchive/r378922/ Log: - Update rc.d script to add a configtest command to test configuration before starting/restarting service. PR: 197587 Submitted by: elbarto at megadrive.org Modified: head/mail/opensmtpd/Makefile head/mail/opensmtpd/files/smtpd.in Modified: head/mail/opensmtpd/Makefile ============================================================================== --- head/mail/opensmtpd/Makefile Fri Feb 13 11:51:06 2015 (r378921) +++ head/mail/opensmtpd/Makefile Fri Feb 13 11:52:22 2015 (r378922) @@ -3,6 +3,7 @@ PORTNAME= opensmtpd PORTVERSION= 5.4.4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= http://www.opensmtpd.org/archives/ \ Modified: head/mail/opensmtpd/files/smtpd.in ============================================================================== --- head/mail/opensmtpd/files/smtpd.in Fri Feb 13 11:51:06 2015 (r378921) +++ head/mail/opensmtpd/files/smtpd.in Fri Feb 13 11:52:22 2015 (r378922) @@ -26,6 +26,11 @@ check_process() name="smtpd" rcvar=smtpd_enable +start_precmd="smtpd_precmd" +restart_precmd="smtpd_checkconfig" +configtest_cmd="smtpd_checkconfig" +extra_commands="configtest" + load_rc_config $name : ${smtpd_enable:="NO"} @@ -37,4 +42,15 @@ command=${smtpd_procname} procname=${smtpd_procname} +smtpd_checkconfig() +{ + echo "Performing sanity check on smtpd configuration:" + eval ${command} ${smtpd_flags} -n +} + +smtpd_precmd() +{ + smtpd_checkconfig +} + run_rc_command "$1"