From owner-freebsd-current Mon May 1 20:00:11 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA16807 for current-outgoing; Mon, 1 May 1995 20:00:11 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id UAA16794 for ; Mon, 1 May 1995 20:00:00 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id TAA13954; Mon, 1 May 1995 19:56:38 -0700 From: "Rodney W. Grimes" Message-Id: <199505020256.TAA13954@gndrsh.aac.dev.com> Subject: Re: Named in /etc/{rc,sysconfig} and named.restart To: nnd@gw.itfs.nsk.su (Nickolay N. Dudorov) Date: Mon, 1 May 1995 19:56:37 -0700 (PDT) Cc: current@FreeBSD.org In-Reply-To: <199504121749.AAA13212@gw.itfs.nsk.su> from "Nickolay N. Dudorov" at Apr 13, 95 00:49:14 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1929 Sender: current-owner@FreeBSD.org Precedence: bulk > > > /etc/sysconfig says that "for most hosts" > named should be started as > named -b /etc/namedb/named.boot > but scripts such as named.restart provided "for all hosts" > restarts named without any args (assuming /etc/named.boot). > > We'll either modify named sources to look at > /etc/namedb/named.boot or modify scripts (named.restart etc), > or upgarde to bind.4.9.3-BETA17 and use (modified) ndc.sh > for named control. Here is my current solution to this, it will be commited after you review it and tell me that it does just what you want it to do. It fixes the problem you pointed out, and a few others that I found along the way (like errors if no named has ever been started). It also will *not* start a named if /etc/sysconfig says to not start one, just like /etc/rc :-) Index: named.restart.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/named/tools/named.restart/named.restart.sh,v retrieving revision 1.2 diff -c -r1.2 named.restart.sh *** 1.2 1994/09/22 20:45:26 --- named.restart.sh 1995/05/02 02:52:02 *************** *** 4,12 **** # $Id: named.restart.sh,v 1.2 1994/09/22 20:45:26 pst Exp $ # PATH=%DESTSBIN%:/bin:/usr/bin ! pid=`cat %PIDDIR%/named.pid` ! kill $pid ! sleep 5 ! exec %INDOT%named --- 4,23 ---- # $Id: named.restart.sh,v 1.2 1994/09/22 20:45:26 pst Exp $ # + # If there is a global system configuration file, suck it in. + if [ -f /etc/sysconfig ]; then + . /etc/sysconfig + fi + PATH=%DESTSBIN%:/bin:/usr/bin ! if [ -f %PIDDIR%/named.pid ]; then ! pid=`cat %PIDDIR%/named.pid` ! kill $pid ! sleep 5 ! fi ! ! # $namedflags is imported from /etc/sysconfig ! if [ "X${namedflags}" != "XNO" ]; then ! exec %INDOT%named ${namedflags} ! fi -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD