aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2015-02-03 01:16:12 +0800
committeradamw <adamw@FreeBSD.org>2015-02-03 01:16:12 +0800
commit99e97777e3689f84275abdf3108456f775ba341c (patch)
tree1728c87e6ad07eb4161cecd08b86e6f401ca3a1c
parent533d47b82a1b5c9625337f1329df0fd8a093af12 (diff)
downloadfreebsd-ports-graphics-99e97777e3689f84275abdf3108456f775ba341c.tar.gz
freebsd-ports-graphics-99e97777e3689f84275abdf3108456f775ba341c.tar.zst
freebsd-ports-graphics-99e97777e3689f84275abdf3108456f775ba341c.zip
rc.d/dovecot allows for multiple concurrent dovecot setups, but in doing
so runs the dovecot binary against each provided configuration file to obtain configuration data. When the configuration file doesn't exist, it says: doveconf: Fatal: open(/im_not_here) failed: No such file or directory Mistyping the conf file locations when doing multiple instances deserves an error message. The real issue here is that in order to set up dovecot, you have to actually copy files over from ${EXAMPLESDIR}. The default configuration file intentionally does not exist in a clean installation. So everybody who installs the dovecot2 port and does not configure it will receive that message at every boot. Fix it with a patch from pi that makes sure the conf file exists before trying to do stuff with it. PORTREVISION bump. PR: 197275 Submitted by: pi
-rw-r--r--mail/dovecot2/Makefile2
-rw-r--r--mail/dovecot2/files/dovecot.in8
2 files changed, 6 insertions, 4 deletions
diff --git a/mail/dovecot2/Makefile b/mail/dovecot2/Makefile
index 0347d0cab6e..bef6aff3df9 100644
--- a/mail/dovecot2/Makefile
+++ b/mail/dovecot2/Makefile
@@ -3,7 +3,7 @@
PORTNAME= dovecot
PORTVERSION= 2.2.15
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail ipv6
MASTER_SITES= http://www.dovecot.org/releases/${PORTVERSION:R}/
PKGNAMESUFFIX= 2
diff --git a/mail/dovecot2/files/dovecot.in b/mail/dovecot2/files/dovecot.in
index bd730030638..28b820459f4 100644
--- a/mail/dovecot2/files/dovecot.in
+++ b/mail/dovecot2/files/dovecot.in
@@ -52,7 +52,9 @@ restart_cmd()
for config in ${dovecot_config}; do
required_files="${config}"
command_args="-c ${config}"
- base_dir=$(${command} ${command_args} -a | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')
- pidfile="${base_dir}/master.pid"
- run_rc_command "$1"
+ 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"
+ fi
done