1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

build bind-4.9.4-P1 ndc in it's own directory

This commit is contained in:
Peter Wemm 1996-08-29 21:46:46 +00:00
parent bee5504dbe
commit 0acc06b17e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17909
2 changed files with 49 additions and 0 deletions

25
usr.sbin/ndc/Makefile Normal file
View File

@ -0,0 +1,25 @@
# $Id$
.include "${.CURDIR}/../named/Makefile.inc"
.PATH: ${BIND_DIR}/named
.PATH: ${BIND_DIR}/man
MAN8= ndc.8
CLEANFILES+= ndc
all: ndc
realinstall:
${INSTALL} -c -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}|" \
-e "s|%PS%|${PS}|" \
-e "s|%DESTSBIN%|${DESTSBIN}|" \
-e "s|%IOT%|${IOT}|" \
< ${BIND_DIR}/named/ndc.sh | awk -f ${.CURDIR}/ndcedit.awk > ndc
.include <bsd.prog.mk>

24
usr.sbin/ndc/ndcedit.awk Normal file
View File

@ -0,0 +1,24 @@
# $Id: awkedit,v 1.1.1.1 1996/08/29 19:42:59 peter Exp $
NR == 3 {
print "# If there is a global system configuration file, suck it in."
print "if [ -f /etc/sysconfig ]; then"
print "\t. /etc/sysconfig"
print "fi\n"
}
{
if ($1 == "named") {
printf "\t\t# $namedflags is imported from /etc/sysconfig\n"
printf "\t\tif [ \"X${namedflags}\" != \"XNO\" ]; then\n"
printf "\t\t\tnamed ${namedflags} && {\n"
getline
printf "\t%s\n", $0
getline
printf "\t%s\n", $0
getline
printf "\t%s\n", $0
printf "\t\tfi\n"
} else {
gsub(":/usr/ucb:", ":", $0);
print;
}
}