PowerDNS Recursor introduces a yaml based configuration in 5.x. Migrating to a yaml config file and remove recursor.conf leads to errors in init script. Reproducible: Always Steps to Reproduce: 1. Install/Upgrade PowerDNS Recursor to 5.0.2 2. Migrate Configuration (rec_control show-yaml >> /etc/powerdns/recursor.yml) 3. Remove old recursor.conf (rm /etc/powerdns/recursor.conf) 4. (Re)Start pdns-recursor Actual Results: Error on Start: awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden * Stopping PowerDNS Recursor ... [ ok ] awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden awk: Fatal: Die Datei »/etc/powerdns/recursor.conf« kann nicht zum Lesen geöffnet werden: Datei oder Verzeichnis nicht gefunden * /var/run/pdns-recursor: creating directory * Starting PowerDNS Recursor ... Expected Results: The init script get chroot-/socket-dir and uid/gid from recursor.yml instead of recursor.conf, if file exists. Starting without errors. The init script gets chroot-/socket-dir and uid/gid from recursor.conf.
Hm, I've been using awk to get the chroot, socket-dir, setuid and setgid parameters from recursor.conf to know where the pidfile is going to end up, create directories and adjust permissions. I tried several things to get the settings independent of the configuration format used, 1) `rec_control get-parameter` (only requests parameters from a running instance) 2) `pdns_recursor --config` (outputs .conf or .yml format depending on configuration used) I'm not keen on supporting both formats in the init script by using something like app-misc/yq to extract the parameters. I'll likely rewrite the init script to get rid of this requirement.