From owner-freebsd-bugs Mon Feb 12 23:20: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B9B2937B491 for ; Mon, 12 Feb 2001 23:20:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1D7K3037478; Mon, 12 Feb 2001 23:20:03 -0800 (PST) (envelope-from gnats) Date: Mon, 12 Feb 2001 23:20:03 -0800 (PST) Message-Id: <200102130720.f1D7K3037478@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Peter Pentchev Subject: Re: misc/25049: named.restart does not use named_flags from rc.conf Reply-To: Peter Pentchev Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/25049; it has been noted by GNATS. From: Peter Pentchev To: richard@gohome.net Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: misc/25049: named.restart does not use named_flags from rc.conf Date: Tue, 13 Feb 2001 09:11:42 +0200 On Mon, Feb 12, 2001 at 06:02:42PM -0800, richard@gohome.net wrote: > > >Number: 25049 > >Category: misc > >Synopsis: named.restart does not use named_flags from rc.conf > >Originator: Richard Roderick > >Release: 4.2 > >Organization: > >Environment: > FreeBSD dns.pdx.uspops.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Mon Nov 20 13:02:55 GMT 2000 jkh@bento.FreeBSD.org:/usr/src/sys/compile/GENERIC i386 > >Description: > named.restart does not maintain the named_flags, particularly when named is started via rc when rc.conf contains named_enable="YES" > >How-To-Repeat: > > >Fix: > modify named.restart to include rc.conf and append ${named_flags} to the exec ndc restart line. Sample patch included. > > --- src/usr.sbin/named.restart/named.restart.sh.orig Mon Feb 12 17:59:01 2001 > +++ src/usr.sbin/named.restart/named.restart.sh Mon Feb 12 18:00:33 2001 > @@ -4,4 +4,12 @@ > # $FreeBSD: src/usr.sbin/named.restart/named.restart.sh,v 1.1.2.1 1999/08/29 15:44:26 peter Exp $ > # > > -exec %DESTSBIN%/%INDOT%ndc restart > +# If there is a global system configuration file, suck it in. > +# > +if [ -f /etc/defaults/rc.conf ]; then > + . /etc/defaults/rc.conf > +elif [ -f /etc/rc.conf ]; then > + . /etc/rc.conf > +fi > + > +exec %DESTSBIN%/%INDOT%ndc restart ${named_flags} Shouldn't this be better done with the source_rc_confs mechanism introduced lately? (it might be a good idea to have a -stable system handy before submitting bug reports, so you are sure you are not submitting something which has been fixed, or out of date :) G'luck, Peter -- If I were you, who would be reading this sentence? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message