diff options
author | peter <peter@FreeBSD.org> | 1999-11-30 06:18:10 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-11-30 06:18:10 +0000 |
commit | cd6a52975db4cbe91262e13f28c3973f82f8f766 (patch) | |
tree | 0fd8dfd1d66ab45e195389556bcdec96ac8a58ca | |
parent | 5eb6dad4e1820167203a37204c899022fe08f0d7 (diff) | |
download | FreeBSD-src-cd6a52975db4cbe91262e13f28c3973f82f8f766.zip FreeBSD-src-cd6a52975db4cbe91262e13f28c3973f82f8f766.tar.gz |
ndc is now a C program that communicates with named via a unix-domain
socket.
-rw-r--r-- | usr.sbin/ndc/Makefile | 14 | ||||
-rw-r--r-- | usr.sbin/ndc/ndcedit.awk | 41 |
2 files changed, 3 insertions, 52 deletions
diff --git a/usr.sbin/ndc/Makefile b/usr.sbin/ndc/Makefile index cd4a54d..033803c 100644 --- a/usr.sbin/ndc/Makefile +++ b/usr.sbin/ndc/Makefile @@ -1,22 +1,14 @@ # $FreeBSD$ +USE_LIBBIND= true .include "${.CURDIR}/../named/Makefile.inc" .PATH: ${BIND_DIR}/bin/ndc .PATH: ${BIND_DIR}/doc/man PROG= ndc -STRIP= +SRCS= pathnames.h \ + ndc.c MAN8= ndc.8 -CLEANFILES+= ndc - -all: ndc - -ndc: ndc.sh ndcedit.awk ${.CURDIR}/../../usr.sbin/named/Makefile.inc - sed -e "s|%PIDFILE%|${PIDDIR}/named.pid|" \ - -e "s|%NAMED%|named|" \ - -e "s|%PS%|${PS}|" \ - < ${BIND_DIR}/bin/ndc/ndc.sh | awk -f ${.CURDIR}/ndcedit.awk > ndc - .include <bsd.prog.mk> diff --git a/usr.sbin/ndc/ndcedit.awk b/usr.sbin/ndc/ndcedit.awk deleted file mode 100644 index 9f9b864..0000000 --- a/usr.sbin/ndc/ndcedit.awk +++ /dev/null @@ -1,41 +0,0 @@ -# $FreeBSD$ -NR == 3 { - print "#" - print "# This file is generated automatically, do not edit it here!" - print "# Please change src/usr.sbin/ndc/ndcedit.awk instead" - print "#" - print "" - - print "# If there is a global system configuration file, suck it in." - print "if [ -f /etc/defaults/rc.conf ]; then" - print "\t. /etc/defaults/rc.conf" - print "elif [ -f /etc/rc.conf ]; then" - print "\t. /etc/rc.conf" - print "fi\n" -} -{ - if ($1 == "named") { - printf "\t\t# $named_flags is imported from /etc/rc.conf\n" - printf "\t\tif [ \"X${named_enable}\" = X\"YES\" ]; then\n" - printf "\t\t\t${named_program} ${named_flags} && {\n" - getline - printf "\t%s\n", $0 - getline - printf "\t%s\n", $0 - getline - printf "\t%s\n", $0 - printf "\t\tfi\n" - } else if (/PS=`/) { - printf "\tif [ -f /proc/$PID/status ]; then\n" - printf "\t\tPS=`cat /proc/$PID/status 2>/dev/null | grep named`\n" - printf "\telse\n" - gsub("\t", "\t\t", $0); - print; - printf "\tfi\n" - } else { - if (/PATH=/) { - gsub(":/usr/ucb:", ":", $0); - } - print; - } -} |