summaryrefslogtreecommitdiffstats
path: root/usr.sbin/named.reload
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2004-09-21 19:01:48 +0000
committerdes <des@FreeBSD.org>2004-09-21 19:01:48 +0000
commita4c12f80064a9009ad12611adb31c37c72ee9eca (patch)
treeee65309033b0451fbda3772ae513fcd9b3dec47a /usr.sbin/named.reload
parent168f1a937f7ee05bd260816130e8771ebf99ba51 (diff)
downloadFreeBSD-src-a4c12f80064a9009ad12611adb31c37c72ee9eca.zip
FreeBSD-src-a4c12f80064a9009ad12611adb31c37c72ee9eca.tar.gz
Switch from BIND 8 to BIND 9.
Submitted by: (in part) dougb@, trhodes@ Reviewed by: dougb@, trhodes@, re@ MFC after: 5 days
Diffstat (limited to 'usr.sbin/named.reload')
-rw-r--r--usr.sbin/named.reload/Makefile12
-rw-r--r--usr.sbin/named.reload/named.reload.8102
-rw-r--r--usr.sbin/named.reload/named.reload.sh41
3 files changed, 93 insertions, 62 deletions
diff --git a/usr.sbin/named.reload/Makefile b/usr.sbin/named.reload/Makefile
index 5cb467a1..7ea9d06 100644
--- a/usr.sbin/named.reload/Makefile
+++ b/usr.sbin/named.reload/Makefile
@@ -1,15 +1,9 @@
# $FreeBSD$
-.include "${.CURDIR}/../named/Makefile.inc"
-
-SCRIPTS= named.reload
+SCRIPTS= named.reload.sh
MAN= named.reload.8
-CLEANFILES+= ${SCRIPTS}
-SCRIPTSNAME= ${SCRIPTS}
-named.reload: named.reload.sh ${BIND_DIR}/Makefile
- sed -e "s|%INDOT%|${INDOT}|" \
- -e "s|%DESTSBIN%|${DESTSBIN}|" \
- < ${.CURDIR}/named.reload.sh > ${.TARGET}
+LINKS= ${BINDIR}/named.reload ${BINDIR}/named.reconfig
+MLINKS= named.reload.8 named.reconfig.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/named.reload/named.reload.8 b/usr.sbin/named.reload/named.reload.8
index b1e5c36..6458774 100644
--- a/usr.sbin/named.reload/named.reload.8
+++ b/usr.sbin/named.reload/named.reload.8
@@ -1,66 +1,68 @@
-.\" ++Copyright++ 1987, 1993
-.\" -
-.\" Copyright (c) 1987, 1993
-.\" The Regents of the University of California. All rights reserved.
+.\"-
+.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
+.\" notice, this list of conditions and the following disclaimer
+.\" in this position and unchanged.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\" may be used to endorse or promote products derived from this software
-.\" without specific prior written permission.
.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\" -
-.\" Portions Copyright (c) 1993 by Digital Equipment Corporation.
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" Permission to use, copy, modify, and distribute this software for any
-.\" purpose with or without fee is hereby granted, provided that the above
-.\" copyright notice and this permission notice appear in all copies, and that
-.\" the name of Digital Equipment Corporation not be used in advertising or
-.\" publicity pertaining to distribution of the document or software without
-.\" specific, written prior permission.
-.\"
-.\" THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
-.\" WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
-.\" CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
-.\" DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
-.\" PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-.\" SOFTWARE.
-.\" -
-.\" --Copyright--
-.\"
-.\" from hostname.7 6.4 (Berkeley) 1/16/90
.\" $FreeBSD$
.\"
-.Dd June 26, 1993
-.Dt @INDOT_U@NAMED.RELOAD @SYS_OPS_EXT_U@
+.Dd September 21, 2004
+.Dt NAMED.RELOAD 8
.Os
.Sh NAME
-.Nm @INDOT@named.reload
-.Nd "cause the name server to synchronize its database"
+.Nm named.reconfig ,
+.Nm named.reload
+.Nd reload name server configuration
+.Sh SYNOPSIS
+.Nm named.reconfig
+.Op Fl V
+.Op Fl c config-file
+.Op Fl k key-file
+.Op Fl s server
+.Op Fl p port
+.Op Fl y keyid
+.Nm named.reload
+.Op Fl V
+.Op Fl c config-file
+.Op Fl k key-file
+.Op Fl s server
+.Op Fl p port
+.Op Fl y keyid
.Sh DESCRIPTION
-This command runs
-.Xr ndc @SYS_OPS_EXT@
-which reloads the running name server.
+The
+.Nm named.reconfig
+command signals the name server to reload its configuration files and
+load any new zones.
+.Pp
+The
+.Nm named.reload
+command signals the name server to reload its configuration files and
+all zones.
+.Pp
+Both these commands take the same command-line arguments as
+.Xr rndc 8 ,
+except for the command argument, which is implied by the name.
.Sh SEE ALSO
-.Xr @INDOT@named @SYS_OPS_EXT@ ,
-.Xr @INDOT@named.restart @SYS_OPS_EXT@ ,
-.Xr @INDOT@ndc @SYS_OPS_EXT@
+.Xr named.conf 5 ,
+.Xr rndc.conf 5 ,
+.Xr named 8 ,
+.Xr rndc 8
diff --git a/usr.sbin/named.reload/named.reload.sh b/usr.sbin/named.reload/named.reload.sh
index 4a657a7..d1ee3af 100644
--- a/usr.sbin/named.reload/named.reload.sh
+++ b/usr.sbin/named.reload/named.reload.sh
@@ -1,7 +1,42 @@
-#!/bin/sh -
+#!/bin/sh
+#-
+# Copyright (c) 2004 Dag-Erling Coïdan Smørgrav
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer
+# in this position and unchanged.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# from named.reload 5.2 (Berkeley) 6/27/89
# $FreeBSD$
#
-exec %DESTSBIN%/%INDOT%ndc reload
+rndc=/usr/sbin/rndc
+me=$(basename $0)
+cmd=${me#named.}
+cmd=${cmd%.sh}
+
+args=$(getopt "c:k:s:p:Vy:" "$@")
+if [ $? -ne 0 -o $# -ne 0 ] ; then
+ echo "usage: ${me} [-V] [-c config-file] [-k key-file]" 1>&2
+ echo " [-s server] [-p port] [-y keyid]" 1>&2
+ exit 1
+fi
+
+exec "${rndc}" "$@" "${cmd}"
OpenPOWER on IntegriCloud