Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ypserv/ypinit * Allow generating more than one amd ...
details: https://anonhg.NetBSD.org/src/rev/86addbe65cc4
branches: trunk
changeset: 513617:86addbe65cc4
user: hubertf <hubertf%NetBSD.org@localhost>
date: Sun Aug 05 12:40:15 2001 +0000
description:
* Allow generating more than one amd map, by storing the maps to create
in a variable that can be added other maps than amd.home. Patch submitted
in PR 11826 by Anthony Mallet <anthony.mallet%ficus.yi.org@localhost>
* Slightly optimize calculation of DOMAIN
diffstat:
usr.sbin/ypserv/ypinit/Makefile.yp | 25 ++++++++++++++++---------
1 files changed, 16 insertions(+), 9 deletions(-)
diffs (76 lines):
diff -r 455860bf5252 -r 86addbe65cc4 usr.sbin/ypserv/ypinit/Makefile.yp
--- a/usr.sbin/ypserv/ypinit/Makefile.yp Sun Aug 05 11:26:52 2001 +0000
+++ b/usr.sbin/ypserv/ypinit/Makefile.yp Sun Aug 05 12:40:15 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.yp,v 1.16 2001/07/03 18:15:06 christos Exp $
+# $NetBSD: Makefile.yp,v 1.17 2001/08/05 12:40:15 hubertf Exp $
#
# This is the YP Makefile, used to create and push YP maps.
#
@@ -23,7 +23,8 @@
YPDBDIR= /var/yp
DIR= /etc
AMDDIR= /etc/amd
-DOMAIN= "`/usr/bin/basename ${.CURDIR}`"
+AMDMAPS= amd.home
+DOMAIN= ${.CURDIR:T}
AWK= /usr/bin/awk
CAT= /bin/cat
@@ -48,7 +49,7 @@
# We have a rule for ypservers, but we don't build it by default, since
# it seldom changes (only when slaves are added/deleted).
-all: passwd aliases amd.home ethers group hosts ipnodes netgroup networks rpc services protocols netid
+all: passwd aliases ${AMDMAPS} ethers group hosts ipnodes netgroup networks rpc services protocols netid
__makedbmesc: .USEBEFORE
if [ -f ${.ALLSRC} ]; then \
@@ -160,19 +161,21 @@
fi
-amd.home.time: ${AMDDIR}/amd.home __makedbmesc
+.for MAP in ${AMDMAPS}
+${MAP}.time: ${AMDDIR}/${MAP} __makedbmesc
-@if [ -f ${.ALLSRC} ]; then \
${TOUCH} ${.TARGET}; \
- ${ECHO} "updated amd.home"; \
+ ${ECHO} "updated ${MAP}"; \
if [ ! ${NOPUSH} ]; then \
- ${YPPUSH} -d ${DOMAIN} amd.home; \
- ${ECHO} "pushed amd.home"; \
+ ${YPPUSH} -d ${DOMAIN} ${MAP}; \
+ ${ECHO} "pushed ${MAP}"; \
else \
: ; \
fi \
else \
${ECHO} "couldn't find ${.ALLSRC}"; \
fi
+.endfor # AMDMAPS
ethers.time: ${DIR}/ethers
@@ -410,7 +413,9 @@
hosts: hosts.time
ipnodes: ipnodes.time
aliases: aliases.time
-amd.home: amd.home.time
+.for MAP in ${AMDMAPS}
+${MAP}: ${MAP}.time
+.endfor # AMDMAPS
ethers: ethers.time
netgroup: netgroup.time
networks: networks.time
@@ -425,7 +430,9 @@
${DIR}/group:
${DIR}/hosts:
${DIR}/mail/aliases:
-${AMDDIR}/amd.home:
+.for MAP in ${AMDMAPS}
+${AMDDIR}/${MAP}:
+.endfor # AMDMAPS
${DIR}/ethers:
${DIR}/master.passwd:
${DIR}/netgroup:
Home |
Main Index |
Thread Index |
Old Index