NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unbound rc chroot not reading conf



Made some progress when I put a copy of the unbound.conf in /etc/unbound and then used rc start to run it normally until I could figure out the chroot. The rc script has a migration function the copied the /etc files back to the chroot dir and now it works!  But I thought I already had the files there. :^/

# /etc/rc.d/unbound start                                               
Migrating /etc/unbound to /var/chroot/unbound/etc/unbound                     
Starting unbound.

I don’t understand why it would not work with the chroot paths already there, until I simply copied the conf file to the non-chroot etc. I’d rather learn why and understand NetBSD rc system better than just live with it...

On September 23, 2018 at 00:03:58, qab smith (qabulin%gmail.com@localhost) wrote:

Unbound is not able to start in chroot using rc scripts. After reading the manuals, my interpretation is that I need to set a unbound_chrootdir as part of the precmd, and maybe some flags. I can get unbound to start in chroot if I launch from the command line, but using the rc start command gives me this error:

# /etc/rc.d/unbound start                                               
/etc/rc.d/unbound: WARNING: /etc/unbound/unbound.conf is not readable.

I’m a little new and accept that I may be misunderstanding how this works exactly, so I would appreciate any guidance.

# rc.conf snippet
unbound=YES
unbound_chrootdir="/var/chroot/unbound"
unbound_flags="-c /var/chroot/unbound/etc/unbound/unbound.conf"

# ls -la /var/chroot/unbound/etc/unbound/
total 48
drwxr-xr-x  2 _unbound  _unbound    512 Sep 22 21:33 .
drwxr-xr-x  3 _unbound  _unbound    512 Jul 17 22:07 ..
-rw-r--r--  1 _unbound  _unbound    280 Sep 22 23:07 unbound.conf


Home | Main Index | Thread Index | Old Index