From owner-svn-ports-head@freebsd.org Fri May 27 07:02:56 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F30ABB4B58E; Fri, 27 May 2016 07:02:56 +0000 (UTC) (envelope-from fluffy@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 mx1.freebsd.org (Postfix) with ESMTPS id CF99610C2; Fri, 27 May 2016 07:02:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4R72uuF042088; Fri, 27 May 2016 07:02:56 GMT (envelope-from fluffy@FreeBSD.org) Received: (from fluffy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4R72tLC042084; Fri, 27 May 2016 07:02:55 GMT (envelope-from fluffy@FreeBSD.org) Message-Id: <201605270702.u4R72tLC042084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fluffy set sender to fluffy@FreeBSD.org using -f From: Dima Panov Date: Fri, 27 May 2016 07:02:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415927 - in head/mail: opensmtpd opensmtpd-devel opensmtpd-devel/files 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.22 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, 27 May 2016 07:02:57 -0000 Author: fluffy Date: Fri May 27 07:02:55 2016 New Revision: 415927 URL: https://svnweb.freebsd.org/changeset/ports/415927 Log: - Allow custom config file in rc script for both stable/devel ports - While here, create makemap symlink only with TABLE_DB enabled Reported by: myself (for adamw) Reviewed by: adamw Approved by: miwi (mentor, implicit) Modified: head/mail/opensmtpd-devel/Makefile head/mail/opensmtpd-devel/files/smtpd.in head/mail/opensmtpd/Makefile head/mail/opensmtpd/files/smtpd.in Modified: head/mail/opensmtpd-devel/Makefile ============================================================================== --- head/mail/opensmtpd-devel/Makefile Fri May 27 06:26:42 2016 (r415926) +++ head/mail/opensmtpd-devel/Makefile Fri May 27 07:02:55 2016 (r415927) @@ -5,6 +5,7 @@ PORTNAME= opensmtpd PORTVERSION= 201602131907 DISTVERSIONSUFFIX= p1 PORTEPOCH= 1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.opensmtpd.org/archives/ \ http://distfiles.pirateparty.in/ashish/ Modified: head/mail/opensmtpd-devel/files/smtpd.in ============================================================================== --- head/mail/opensmtpd-devel/files/smtpd.in Fri May 27 06:26:42 2016 (r415926) +++ head/mail/opensmtpd-devel/files/smtpd.in Fri May 27 07:02:55 2016 (r415927) @@ -18,11 +18,6 @@ . /etc/rc.subr -check_process() -{ - /bin/pgrep -j none -f "^$smtpd_procname\$" -} - name="smtpd" rcvar=smtpd_enable @@ -34,18 +29,21 @@ extra_commands="configtest" load_rc_config $name : ${smtpd_enable:="NO"} -: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"} -: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"} +: ${smtpd_config:="%%PREFIX%%/etc/mail/${name}.conf"} +: ${smtpd_procname:="%%PREFIX%%/sbin/${name}"} : ${smtpd_flags:=""} command=${smtpd_procname} +command_args="-f ${smtpd_config} ${command_args}" +required_files="${smtpd_config}" procname=${smtpd_procname} +pidfile="/var/run/${name}.pid" smtpd_checkconfig() { echo "Performing sanity check on smtpd configuration:" - eval ${command} ${smtpd_flags} -n + eval ${command} ${command_args} ${smtpd_flags} -n } smtpd_precmd() Modified: head/mail/opensmtpd/Makefile ============================================================================== --- head/mail/opensmtpd/Makefile Fri May 27 06:26:42 2016 (r415926) +++ head/mail/opensmtpd/Makefile Fri May 27 07:02:55 2016 (r415927) @@ -4,6 +4,7 @@ PORTNAME= opensmtpd PORTVERSION= 5.9.2p1 PORTEPOCH= 1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.opensmtpd.org/archives/ \ http://distfiles.pirateparty.in/ashish/ @@ -68,7 +69,9 @@ CONFIGURE_ARGS+= --with-libasr=${LOCALBA post-patch: ${REINPLACE_CMD} -e '/chmod 2555/d' ${WRKSRC}/mk/smtpctl/Makefile.in +.if ${PORT_OPTIONS:MTABLE_DB} post-install: @${LN} -sf ${PREFIX}/sbin/smtpctl ${STAGEDIR}${PREFIX}/libexec/opensmtpd/makemap +.endif .include Modified: head/mail/opensmtpd/files/smtpd.in ============================================================================== --- head/mail/opensmtpd/files/smtpd.in Fri May 27 06:26:42 2016 (r415926) +++ head/mail/opensmtpd/files/smtpd.in Fri May 27 07:02:55 2016 (r415927) @@ -18,11 +18,6 @@ . /etc/rc.subr -check_process() -{ - /bin/pgrep -j none -f "${smtpd_procname}" -} - name="smtpd" rcvar=smtpd_enable @@ -34,18 +29,21 @@ extra_commands="configtest" load_rc_config $name : ${smtpd_enable:="NO"} -: ${smtpd_config:="%%PREFIX%%/etc/mail/smtpd.conf"} -: ${smtpd_procname:="%%PREFIX%%/sbin/smtpd"} +: ${smtpd_config:="%%PREFIX%%/etc/mail/${name}.conf"} +: ${smtpd_procname:="%%PREFIX%%/sbin/${name}"} : ${smtpd_flags:=""} command=${smtpd_procname} +command_args="-f ${smtpd_config} ${command_args}" +required_files="${smtpd_config}" procname=${smtpd_procname} +pidfile="/var/run/${name}.pid" smtpd_checkconfig() { echo "Performing sanity check on smtpd configuration:" - eval ${command} ${smtpd_flags} -n + eval ${command} ${command_args} ${smtpd_flags} -n } smtpd_precmd()