From 6222ef77b8bbb70ae70b47ceaa9d370e7716a6f9 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 3 May 1998 05:14:04 +0000 Subject: Update for bind-8. Also use /proc in preference to the (seemingly) always broken ps(1). --- usr.sbin/ndc/Makefile | 23 ++++++++++------------- usr.sbin/ndc/ndcedit.awk | 12 ++++++++---- 2 files changed, 18 insertions(+), 17 deletions(-) (limited to 'usr.sbin/ndc') 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 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; } -- cgit v1.1