Created attachment 164906 [details] Patch for the port. The dovecot2 ports does not ship with a default config (bug #198792). The dovecot2 port also brings the ability to run multiple instances of dovecot2 at once. ports r378311 changed the behavior of the rc-script to only `run_rc_command` for those config files listed in the rcvar that are actually present. However, this leads to the following situation: - User installs mail/dovecot2 - User / Automation tool runs `service dovecot <command>`, e.g. command=rcvar - Script produces no output because `run_rc_command` is not run because no config file exists. While easily resolvable by first deploying the configuration and then running `service...`, the script should still work. I therefore propose the patch I attached to this report.
Sorry about the delay in responding to this PR. It'll be another day or two before I can play with it, but this patch sounds like a great idea.
A commit references this bug: Author: adamw Date: Tue Jan 5 20:59:02 UTC 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@cschwarz.com Changes: head/mail/dovecot2/Makefile head/mail/dovecot2/files/dovecot.in
Committed, along with a message stating the config file doesn't exist, and a pointer to the instructions to create it. Thanks for this!
(In reply to Adam Weinberger from comment #3) I would propose merging the change back into the quarterly 2016Q1 branch. The specific revision to be merged into 2016Q1: ports r405316
Re-open for MFH request (comment 4)
MFH completed in r407391.
A commit references this bug: Author: adamw Date: Thu Jan 28 01:32:36 UTC 2016 New revision: 407391 URL: https://svnweb.freebsd.org/changeset/ports/407391 Log: MFH: r405316 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@cschwarz.com Approved by: ports-secteam (feld) Changes: _U branches/2016Q1/ branches/2016Q1/mail/dovecot2/Makefile branches/2016Q1/mail/dovecot2/files/dovecot.in