On 13/11/2017 15:55, Dag-Erling Smørgrav wrote: > Andriy Gapon <a...@freebsd.org> writes: >> First, there is now an automatically generated /etc/resolvconf.conf. >> It has the following comment: >> # This file was generated by local-unbound-setup. >> # Modifications will be overwritten. >> Is that comment really true? >> What and when is going to overwrite my modifications? > > service local_unbound setup
So, this is not going to happen automatically (after the initial setup) ? I have to manually run that command? If yes, then this is much less scary then the unconditional warning in the file. >> Next. The auto-generated resolvconf.conf has this trick to prevent >> modifications >> of resolv.conf: resolv_conf="/dev/null" >> The trick works but it causes some small noise when resolvconf is run, like >> cannot copy /dev/null to /dev/null.bak. >> I think that a nicer solution is to just set name_servers=127.0.0.1: > > No, if we let resolvconf overwrite resolv.conf then we lose "options > edns0". There seems to be a small misunderstanding. The point I was trying to make is that resolvconf would NOT overwrite resolv.conf if it's configured the way I suggested. The details are in my original email. I never tried to suggest that we should let resolvconf overwrite resolv.conf. > What it boils down to is that resolvconf is a piece of shit and the only > way to get it to do what we want would be to write a special backend for > the local_unbound case (see /libexec/resolvconf). Well, I do not see why... We already configure resolvconf to not touch resolv.conf. And resolvconf already has a backend for unbound, it is able to manage the local_unbound configuration quite reasonably (from my experience). >> unbound: [7457:0] error: cannot chdir to directory: (No such file or >> directory) > > This error is emitted by the configuration parser when it encounters the > "directory" directive in the "server" section and fails to chdir to the > specified directory, but there should be a name there. Can you do: > > # service local_unbound stop > # mv /var/unbound /var/unbound.orig > # mtree -deU -f /etc/mtree/BSD.var.dist > # service local_unbound setup > # diff -ru /var/unbound.orig /var/unbound > > and tell me if there are any differences? Alexander Zagrebin already explained what's going on here. local_unbound setup produces this configuration: chroot: /var/unbound directory: /var/unbound And with it unbound apparently tries to chdir to "" after chrooting to /var/unbound. That is, it removes $chroot from $directory and chdir-s to the result. Changing directory to /var/unbound/ makes the complaint go away. -- Andriy Gapon _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"