summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ndc
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-05-03 05:14:04 +0000
committerpeter <peter@FreeBSD.org>1998-05-03 05:14:04 +0000
commit6222ef77b8bbb70ae70b47ceaa9d370e7716a6f9 (patch)
tree9fb59f76240efc0104e7269c4d1521fc82f0781a /usr.sbin/ndc
parent3f861866b3cb1fcc04282e2e87a89161e9f42589 (diff)
downloadFreeBSD-src-6222ef77b8bbb70ae70b47ceaa9d370e7716a6f9.zip
FreeBSD-src-6222ef77b8bbb70ae70b47ceaa9d370e7716a6f9.tar.gz
Update for bind-8. Also use /proc in preference to the (seemingly) always
broken ps(1).
Diffstat (limited to 'usr.sbin/ndc')
-rw-r--r--usr.sbin/ndc/Makefile23
-rw-r--r--usr.sbin/ndc/ndcedit.awk12
2 files changed, 18 insertions, 17 deletions
diff --git a/usr.sbin/ndc/Makefile b/usr.sbin/ndc/Makefile
index 732ea65..a68671e 100644
--- a/usr.sbin/ndc/Makefile
+++ b/usr.sbin/ndc/Makefile
@@ -1,25 +1,22 @@
-# $Id$
+# $Id: Makefile,v 1.4 1997/02/22 16:08:18 peter Exp $
.include "${.CURDIR}/../named/Makefile.inc"
-.PATH: ${BIND_DIR}/named
-.PATH: ${BIND_DIR}/man
+.PATH: ${BIND_DIR}/bin/ndc
+.PATH: ${BIND_DIR}/doc/man
+PROG= ndc
+STRIP=
MAN8= ndc.8
+
CLEANFILES+= ndc
all: ndc
-realinstall:
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} ndc \
- ${DESTDIR}${BINDIR}
-
-ndc: ndc.sh ndcedit.awk ${BIND_DIR}/Makefile
- sed -e "s|%PIDDIR%|${PIDDIR}|" \
- -e "s|%INDOT%|${INDOT}|" \
+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}|" \
- -e "s|%DESTSBIN%|${DESTSBIN}|" \
- -e "s|%IOT%|${IOT}|" \
- < ${BIND_DIR}/named/ndc.sh | awk -f ${.CURDIR}/ndcedit.awk > ndc
+ < ${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
index 8074819..67b45fe 100644
--- a/usr.sbin/ndc/ndcedit.awk
+++ b/usr.sbin/ndc/ndcedit.awk
@@ -1,4 +1,4 @@
-# $Id: ndcedit.awk,v 1.5 1997/05/27 07:19:57 jkh Exp $
+# $Id: ndcedit.awk,v 1.6 1997/06/18 01:55:19 jkh Exp $
NR == 3 {
print "#"
print "# This file is generated automatically, do not edit it here!"
@@ -23,12 +23,16 @@ NR == 3 {
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);
- if (!/export/) {
- $0=$0"\nexport PATH";
- }
}
print;
}
OpenPOWER on IntegriCloud