Created attachment 163700 [details] local_unbound-config.diff I'm trying to update my nanobsd-based LAN router/DNS caching server from FreeBSD 9.3 with stock bind server to 10.2 stock unbound server. /var contents is not persistent between reboots but /etc is for this nanobsd installion. So, I need to keep unbound configuration in /etc/unbound/ directory instead of defaul /var/unbound/ This should be accomplished witht following lines in /etc/rc.conf: local_unbound_enable="YES" local_unbound_workdir="/etc/unbound" But it does not work currently due to a bug in /etc/rc.d/local_unbound startup script that loads local configuration too late and only local_unbound_workdir gets overrided but not dependent settings like local_unbound_config, local_unbound_anchor etc. that keep pointing to non-existing /var/unbound/ directory. Trivial patch fixing the bug is attached.
A commit references this bug: Author: des Date: Tue Dec 1 13:20:21 UTC 2015 New revision: 291582 URL: https://svnweb.freebsd.org/changeset/base/291582 Log: Load our configuration before setting defaults, so local_unbound_workdir actually has an effect. PR: 204931 Submitted by: Eugene Grosbein <eugen@grosbein.net> MFC after: 1 week Changes: head/etc/rc.d/local_unbound
A commit references this bug: Author: des Date: Fri Dec 4 13:26:13 UTC 2015 New revision: 291767 URL: https://svnweb.freebsd.org/changeset/base/291767 Log: MFH (r287917, r287918, r289063): upgrade to latest Unbound MFH (r283301, r289592, r291582): rc script improvements MFH (r287880): respect manually configured forwarders when using DHCP MFH (r289321): deconfuse man page PR: 184047 203580 204931 Changes: _U stable/10/ stable/10/contrib/unbound/Makefile.in stable/10/contrib/unbound/acx_nlnetlabs.m4 stable/10/contrib/unbound/compat/getentropy_linux.c stable/10/contrib/unbound/compat/reallocarray.c stable/10/contrib/unbound/config.h stable/10/contrib/unbound/config.h.in stable/10/contrib/unbound/configure stable/10/contrib/unbound/configure.ac stable/10/contrib/unbound/daemon/cachedump.c stable/10/contrib/unbound/daemon/daemon.c stable/10/contrib/unbound/daemon/remote.c stable/10/contrib/unbound/daemon/stats.c stable/10/contrib/unbound/daemon/stats.h stable/10/contrib/unbound/daemon/worker.c stable/10/contrib/unbound/daemon/worker.h stable/10/contrib/unbound/dns64/dns64.c stable/10/contrib/unbound/dnstap/dnstap.c stable/10/contrib/unbound/doc/Changelog stable/10/contrib/unbound/doc/README stable/10/contrib/unbound/doc/example.conf stable/10/contrib/unbound/doc/example.conf.in stable/10/contrib/unbound/doc/libunbound.3 stable/10/contrib/unbound/doc/libunbound.3.in stable/10/contrib/unbound/doc/unbound-anchor.8 stable/10/contrib/unbound/doc/unbound-anchor.8.in stable/10/contrib/unbound/doc/unbound-checkconf.8 stable/10/contrib/unbound/doc/unbound-checkconf.8.in stable/10/contrib/unbound/doc/unbound-control.8 stable/10/contrib/unbound/doc/unbound-control.8.in stable/10/contrib/unbound/doc/unbound-host.1 stable/10/contrib/unbound/doc/unbound-host.1.in stable/10/contrib/unbound/doc/unbound.8 stable/10/contrib/unbound/doc/unbound.8.in stable/10/contrib/unbound/doc/unbound.conf.5 stable/10/contrib/unbound/doc/unbound.conf.5.in stable/10/contrib/unbound/iterator/iter_delegpt.c stable/10/contrib/unbound/iterator/iter_fwd.c stable/10/contrib/unbound/iterator/iter_hints.c stable/10/contrib/unbound/iterator/iter_priv.c stable/10/contrib/unbound/iterator/iter_resptype.c stable/10/contrib/unbound/iterator/iter_scrub.c stable/10/contrib/unbound/iterator/iter_utils.c stable/10/contrib/unbound/iterator/iter_utils.h stable/10/contrib/unbound/iterator/iterator.c stable/10/contrib/unbound/iterator/iterator.h stable/10/contrib/unbound/ldns/ stable/10/contrib/unbound/libunbound/context.c stable/10/contrib/unbound/libunbound/libunbound.c stable/10/contrib/unbound/libunbound/libworker.c stable/10/contrib/unbound/libunbound/python/Makefile stable/10/contrib/unbound/libunbound/python/examples/async-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dnssec-valid.py stable/10/contrib/unbound/libunbound/python/examples/dnssec_test.py stable/10/contrib/unbound/libunbound/python/examples/example8-1.py stable/10/contrib/unbound/libunbound/python/examples/idn-lookup.py stable/10/contrib/unbound/libunbound/python/examples/mx-lookup.py stable/10/contrib/unbound/libunbound/python/examples/ns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/reverse-lookup.py stable/10/contrib/unbound/libunbound/python/file_py3.i stable/10/contrib/unbound/libunbound/python/libunbound.i stable/10/contrib/unbound/libunbound/worker.h stable/10/contrib/unbound/services/cache/dns.c stable/10/contrib/unbound/services/cache/infra.c stable/10/contrib/unbound/services/cache/infra.h stable/10/contrib/unbound/services/cache/rrset.c stable/10/contrib/unbound/services/listen_dnsport.c stable/10/contrib/unbound/services/listen_dnsport.h stable/10/contrib/unbound/services/localzone.c stable/10/contrib/unbound/services/localzone.h stable/10/contrib/unbound/services/mesh.c stable/10/contrib/unbound/services/outside_network.c stable/10/contrib/unbound/sldns/ stable/10/contrib/unbound/sldns/rrdef.h stable/10/contrib/unbound/smallapp/unbound-anchor.c stable/10/contrib/unbound/smallapp/unbound-checkconf.c stable/10/contrib/unbound/smallapp/unbound-control-setup.sh stable/10/contrib/unbound/smallapp/unbound-control-setup.sh.in stable/10/contrib/unbound/smallapp/unbound-control.c stable/10/contrib/unbound/smallapp/unbound-host.c stable/10/contrib/unbound/util/alloc.c stable/10/contrib/unbound/util/alloc.h stable/10/contrib/unbound/util/config_file.c stable/10/contrib/unbound/util/config_file.h stable/10/contrib/unbound/util/configlexer.lex stable/10/contrib/unbound/util/configparser.y stable/10/contrib/unbound/util/data/dname.c stable/10/contrib/unbound/util/data/msgencode.c stable/10/contrib/unbound/util/data/msgparse.c stable/10/contrib/unbound/util/data/msgparse.h stable/10/contrib/unbound/util/data/msgreply.c stable/10/contrib/unbound/util/data/msgreply.h stable/10/contrib/unbound/util/data/packed_rrset.c stable/10/contrib/unbound/util/data/packed_rrset.h stable/10/contrib/unbound/util/fptr_wlist.c stable/10/contrib/unbound/util/iana_ports.inc stable/10/contrib/unbound/util/log.c stable/10/contrib/unbound/util/log.h stable/10/contrib/unbound/util/net_help.c stable/10/contrib/unbound/util/netevent.c stable/10/contrib/unbound/util/netevent.h stable/10/contrib/unbound/validator/autotrust.c stable/10/contrib/unbound/validator/val_anchor.c stable/10/contrib/unbound/validator/val_kentry.c stable/10/contrib/unbound/validator/val_neg.c stable/10/contrib/unbound/validator/val_nsec3.c stable/10/contrib/unbound/validator/val_secalgo.c stable/10/contrib/unbound/validator/val_sigcrypt.c stable/10/contrib/unbound/validator/validator.c stable/10/etc/rc.d/local_unbound stable/10/lib/libunbound/Makefile stable/10/usr.sbin/unbound/local-setup/local-unbound-setup.sh