/var/run/named/ not created without pidfile
Philip Prindeville
philipp_subx at redfish-solutions.com
Mon Nov 29 18:11:21 UTC 2021
I was looking through the sources trying to troubleshoot:
https://github.com/openwrt/packages/pull/17037
and how named_os_writepidfile() works, and it calls named_os_openfile() which in turn calls mkdirpath() -- so /var/run/named/ gets created as a side-effect of named_g_defaultpidfile getting opened for writing.
The problem is that OpenWRT uses procd to start processes (services) and runs them in the foreground, so procd can detect when the process dies and needs to be restarted.
If /var/run/named/named.pid never gets created, then /var/run/named never gets created.
Can we explicitly create /var/run/named/ (circa line 9045 in bin/named/server.c) whether we're invoking with -f or -g or not?
Because even if we don't create /var/run/named/named.pid, we'll still create /var/run/named/session.key etc.
It's not onerous to have to create /var/run/named/ manually in the startup script, but it is a little inconsistent that it gets created for you if you're not using -f, but it doesn't if you are using it...
Thanks,
-Philip
More information about the bind-workers
mailing list