Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 May 1995 19:56:37 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        nnd@gw.itfs.nsk.su (Nickolay N. Dudorov)
Cc:        current@FreeBSD.org
Subject:   Re: Named in /etc/{rc,sysconfig} and named.restart
Message-ID:  <199505020256.TAA13954@gndrsh.aac.dev.com>
In-Reply-To: <199504121749.AAA13212@gw.itfs.nsk.su> from "Nickolay N. Dudorov" at Apr 13, 95 00:49:14 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 
> 	/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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199505020256.TAA13954>