From owner-freebsd-current@FreeBSD.ORG Mon Dec 7 17:51:41 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C1E5106566B for ; Mon, 7 Dec 2009 17:51:41 +0000 (UTC) (envelope-from mike@jellydonut.org) Received: from mail-px0-f194.google.com (mail-px0-f194.google.com [209.85.216.194]) by mx1.freebsd.org (Postfix) with ESMTP id 608258FC19 for ; Mon, 7 Dec 2009 17:51:41 +0000 (UTC) Received: by pxi32 with SMTP id 32so2046142pxi.15 for ; Mon, 07 Dec 2009 09:51:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.67.25 with SMTP id u25mr2336897muk.45.1260208298926; Mon, 07 Dec 2009 09:51:38 -0800 (PST) In-Reply-To: <4B12CCA8.7050808@omnilan.de> References: <4B12CCA8.7050808@omnilan.de> Date: Mon, 7 Dec 2009 12:51:38 -0500 Message-ID: <1de79840912070951p1abf7dbfxdf7d5ea5ab5903cd@mail.gmail.com> From: Michael Proto To: Harald Schmalzbauer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org Subject: Re: named, VARMFS=yes and FILESDIR X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 17:51:41 -0000 On Sun, Nov 29, 2009 at 2:34 PM, Harald Schmalzbauer wrote: > Hello, > > while building an embedded slave DNS I recognized that running named out = of > the box with VARMFS enabled would fail. > Now I could easily fix it for my device only, but I think it's better to > solve it upstream. > VARMFS=3DYes is a standard option, likewise named_enable. > > Short description of the problem: > When rc detects non-writabel /var or VARMFS is set to yes, a new /var tre= e > gets populated. This comes without config, hint file and likewise for > /var/named/namedb, but /etc/namedb is a symlink to /var/named/namedb. > > rc.d/named could easily be supplemented with the neccessary checks, but w= e > don't have the needed files outside of /var. > > My idea is to create a namedb directory in /usr/share (like there's one f= or > sendmail) with duplicate entries of src/etc/namedb > > Unfortunately I couldn't find out where FILESDIR is processed in the bsd > build stages. > If the idea is plausable, how do I best install /usr/share/namedb? > src/etc/namedb is entered at DISTRIBUTION target, right? > > Id highly appreciate if somebody who's familar with the build stages coul= d > give me some hints. > > Thanks, > > -Harry > > P.S.: named_conf definitions in rc.conf get lost. Here's the patch: > --- etc/rc.d/named.orig 2009-09-13 20:11:34.000000000 +0200 > +++ etc/rc.d/named =A0 =A0 =A02009-09-13 21:38:29.000000000 +0200 > @@ -264,6 +284,6 @@ > =A0# > =A0required_dirs=3D"$named_chrootdir" =A0 =A0 =A0 # if it is set, it must= exist > =A0pidfile=3D"${named_pidfile:-/var/run/named/pid}" > -command_args=3D"-u ${named_uid:=3Droot}" > +command_args=3D"-c $named_conf -u ${named_uid:=3Droot}" > > I think this is likely an ordering issue, as I use a MFS-based /var on my home router and named works with the default /var/named chroot just fine. My main difference being I define the MFS /var in fstab as opposed to the varmfs=3D"YES" rc.conf tunable. /etc/fstab: md /var mfs rw,async,-s12m 2 0 /etc/rc.conf: populate_var=3D"YES" With these settings a chrooted named into /var/named works just as expected= . -Proto