svn commit: r405316 - in head/mail/dovecot2: . files

Adam Weinberger adamw at FreeBSD.org
Tue Jan 5 20:59:04 UTC 2016


Author: adamw
Date: Tue Jan  5 20:59:02 2016
New Revision: 405316
URL: https://svnweb.freebsd.org/changeset/ports/405316

Log:
  Execute run_rc_command even if the config file doesn't exist. Previously,
  until you followed the instructions in pkg-message, the config file didn't
  exist and rc.d/dovecot would just silently exit.
  
  While here, also spit out a message reminding you to create the config
  files if necessary.
  
  PR:		205761
  Submitted by:	me at cschwarz.com

Modified:
  head/mail/dovecot2/Makefile
  head/mail/dovecot2/files/dovecot.in

Modified: head/mail/dovecot2/Makefile
==============================================================================
--- head/mail/dovecot2/Makefile	Tue Jan  5 20:43:49 2016	(r405315)
+++ head/mail/dovecot2/Makefile	Tue Jan  5 20:59:02 2016	(r405316)
@@ -14,6 +14,7 @@
 
 PORTNAME=	dovecot
 PORTVERSION=	2.2.21
+PORTREVISION=	1
 CATEGORIES=	mail ipv6
 MASTER_SITES=	http://www.dovecot.org/releases/${PORTVERSION:R}/
 PKGNAMESUFFIX=	2

Modified: head/mail/dovecot2/files/dovecot.in
==============================================================================
--- head/mail/dovecot2/files/dovecot.in	Tue Jan  5 20:43:49 2016	(r405315)
+++ head/mail/dovecot2/files/dovecot.in	Tue Jan  5 20:59:02 2016	(r405316)
@@ -55,6 +55,11 @@ for config in ${dovecot_config}; do
 	if [ -f ${config} ]; then
 		base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')
 		pidfile="${base_dir}/master.pid"
-		run_rc_command "$1"
+	else
+		echo "==Error=="
+		echo "Config file ${config} does not exist. If this is"
+		echo "a new installation, please create the config files as outlined in"
+		echo "	# pkg info -D dovecot2"
 	fi
+	run_rc_command "$1"
 done


More information about the svn-ports-all mailing list