Put $Id$ on all of these.
Correct Makefile so that we build during all: and only install for make install. If /etc/sysconfig exists source it to get the flags for restarting named with. If /etc/sysconfig says no named runs, don't try to start one. Don't attempt to kill anything if we can not find the named.pid file. Reviewed by: Nickolay N. Dudorov <nnd@gw.itfs.nsk.su>
This commit is contained in:
parent
d351daa0af
commit
de684417c4
@ -1,4 +1,5 @@
|
||||
# @(#)Makefile 5.1 (Berkeley) 5/28/90
|
||||
# $Id$
|
||||
|
||||
MAN8= named.restart.8
|
||||
CLEANFILES+=named.restart
|
||||
@ -6,10 +7,12 @@ CLEANFILES+=named.restart
|
||||
PIDDIR=/var/run
|
||||
INDOT=
|
||||
|
||||
beforeinstall: named.restart
|
||||
beforeinstall:
|
||||
install -c -o ${BINOWN} -g ${BINGRP} -m 555 \
|
||||
named.restart ${DESTDIR}${BINDIR}
|
||||
|
||||
all: named.restart
|
||||
|
||||
named.restart: named.restart.sh Makefile
|
||||
sed -e "s|%PIDDIR%|${PIDDIR}|" \
|
||||
-e "s|%INDOT%|${INDOT}|" \
|
||||
|
@ -52,14 +52,17 @@
|
||||
.\" --Copyright--
|
||||
.\"
|
||||
.\" from hostname.7 6.4 (Berkeley) 1/16/90
|
||||
.\" $Id$
|
||||
.\"
|
||||
.TH NAMED.RESTART 8 "June 26, 1993"
|
||||
.TH NAMED.RESTART 8 "May 2, 1995"
|
||||
.UC 5
|
||||
.SH NAME
|
||||
named.restart \- stop and restart the name server
|
||||
.SH DESCRIPTION
|
||||
This command sends a \s-1SIGKILL\s+1 to the running name server and then
|
||||
starts a new one.
|
||||
starts a new one if
|
||||
.IR /etc/sysconfig
|
||||
states that one should be running on this system.
|
||||
.SH BUGS
|
||||
Does not check to see if the name server is actually running, and could
|
||||
use a stale PID cache file which may result in the death of an unrelated
|
||||
|
@ -1,12 +1,23 @@
|
||||
#!/bin/sh -
|
||||
#
|
||||
# from named.restart 5.4 (Berkeley) 6/27/89
|
||||
# $Id: named.restart.sh,v 4.9.1.5 1994/04/09 03:43:17 vixie Exp $
|
||||
# $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
|
||||
|
||||
pid=`cat %PIDDIR%/named.pid`
|
||||
kill $pid
|
||||
sleep 5
|
||||
exec %INDOT%named
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user