Bug 255897 - dns/powerdns-recursor fails to start if pdns_recursor_flags rc var is set
Summary: dns/powerdns-recursor fails to start if pdns_recursor_flags rc var is set
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2021-05-15 13:06 UTC by Alessandro Sagratini
Modified: 2021-06-12 12:34 UTC (History)
1 user (show)

See Also:
tremere: maintainer-feedback-

rc.d script (638 bytes, application/x-shellscript)
2021-05-17 13:18 UTC, Alessandro Sagratini
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Sagratini 2021-05-15 13:06:53 UTC
I'm reaching out because, since this [1] commit, powerdns-recursor no longer starts if pdns_recursor_flags rc var is set.

Reproducing the issue should be fairly simple, just set 

(or anything of your choice) in /etc/rc.conf and restart the service. Following error message should appear
pdns_recursor not running? (check /var/run/pdns_recursor.pid).
Starting pdns_recursor.
daemon: illegal option -- -
usage: daemon [-cfHrS] [-p child_pidfile] [-P supervisor_pidfile]
              [-u user] [-o output_file] [-t title]
              [-l syslog_facility] [-s syslog_priority]
              [-T syslog_tag] [-m output_mask] [-R restart_delay_secs]
command arguments ...
/usr/local/etc/rc.d/pdns-recursor: WARNING: failed to start pdns_recursor

reverting rc script [1] removes the error message.

[1] https://cgit.freebsd.org/ports/commit/dns/powerdns-recursor/files/pdns-recursor.in?id=e5f6c6eee3ac2e99ec07cdb060bc6d19ed898bf1
Comment 1 Ralf van der Enden 2021-05-17 08:35:45 UTC

Making the rc.d use /usr/sbin/daemon caused the error you're seeing. Since I dont use the _flags variable myself, I hadn't run into it myself while testing. Sorry about that.

I fixed the script in bug #255842
Comment 2 Alessandro Sagratini 2021-05-17 13:18:11 UTC
Created attachment 225026 [details]
rc.d script

Thank you, be aware that any line with "daemon" should be removed, please find attached a working script.
Comment 3 Ralf van der Enden 2021-06-12 12:21:19 UTC
Please close this PR. Taken care of by bug #256530
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2021-06-12 12:34:32 UTC
^Triage: OBE, see PR 256530.