reopen 543580
retitle 543580 enhance nsd3 init script to help people wanting to setup a chroot
kthxbye

On Wed, Aug 26, 2009 at 02:10:51AM +0100, Francis Russell wrote:
> Pierre Habouzit wrote:
> > On Tue, Aug 25, 2009 at 10:47:08PM +0100, Francis Russell wrote:
> >> Package: nsd3
> >> Version: 3.2.2-1
> >> Severity: normal
> >>
> >>
> >> The nsd3 init script assumes /var/lib/nsd3/nsd.db is the location of
> the nsd database and if is not present,
> >
> > Huh, no it doesn't, I see nsd.db hardcoded nowhere in the init script.
> 
> Apologies, I slightly misread the shell script wrt. when the database is
> rebuilt. Still, there is a hardcoded reference to the database location.
> If the database is located in that location, the database will be
> rebuilt every time /etc/init.d/nsd3 start is called. This seems to be an
> undesirable behaviour. Furthermore, as the location is hardcoded, if a
> chroot is used, the auto-building behaviour will disappear.
> 
> Quoting the exact lines from /etc/init.d/nsd3:
> 
> case "$1" in
>     start)
>         [ -f /var/lib/nsd3/nsd.db ] || ctl nsd rebuild "Building nsd3
> zones..."
>         ctl root start   "Starting nsd3..."
>         ;;

Oh right, I was looking at an older nsd3 init script. I remember I did
that recently, it should indeed be

$(nsd-checkconf -o database /etc/nsd3/nsd.conf) instead.

I had a bug report about that because if no database is there, nsd3 may
fail to start IIRC, which makes the package not install properly or
similar. Of course, with a chroot this will work bizarely at best, but I
do not support such a setup yet. I'll try to amend the init script and
just let it not trying to be smart when a chroot is used (which I can
know using nsd-checkconf -o chroot)

Meanwhile, just comment that line out in your setup.

-- 
Intersec <http://www.intersec.com>
Pierre Habouzit <[email protected]>
Tél : +33 (0)1 5570 3346
Mob : +33 (0)6 1636 8131
Fax : +33 (0)1 5570 3332
37 Rue Pierre Lhomme
92400 Courbevoie



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to