Kea can be built with PostgreSQL and/or MySQL support; would it be feasible to add postgresql and mysql to its # REQUIRES line conditionally? If Kea starts before the DB server it bails out immediately with a database connection error.
I'll check if any other ports do that already, not a bad idea!
Among what I have installed, PowerDNS does, but unconditionally (it always has both postgresql and mysql in its REQUIRES, no matter if the options are enabled), though I figure it would not be hard to make it only add to the line if the option is set.
Created attachment 222889 [details] dynamically require DB server to be up on startup See if this patch works for you?
(In reply to Andrey Pevnev from comment #3) The generated rc.d script properly lists postgresql in the requirements and rcorder now lists kea after postgresql. Thank you!
Committed!
A commit references this bug: Author: nc Date: Tue Mar 2 22:31:14 UTC 2021 New revision: 566999 URL: https://svnweb.freebsd.org/changeset/ports/566999 Log: net/kea: Add MySQL and PostgreSQL to the REQUIRES line in the rc.d script. This prevents database connection errors upon startup. PR: 253559 Submitted by: Kamigishi Rei <spambox AT haruhiism DOT net> Approved by: Andrey Pevnev <apevnev AT me DOT com> (maintainer) Changes: head/net/kea/Makefile head/net/kea/files/kea.in