Add sample rules for amd.host, mostly from the AMD docs, but tweaked to fit

the FreeBSD Makefile.yp structure by me.  This allows you to have a single
amd map for all machines in a cluster.

In /etc/sysconfig, it would look something like:
  amdflags="-p -a /net -c 1800 -l syslog /host amd.host"
This commit is contained in:
Peter Wemm 1996-07-24 10:48:07 +00:00
parent e56dd1bb4f
commit 57948c0b54
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17266

View File

@ -1,7 +1,7 @@
#
# Makefile for the NIS databases
#
# $Id: Makefile.yp,v 1.7 1996/06/25 20:28:01 wpaul Exp $
# $Id: Makefile.yp,v 1.8 1996/07/18 23:48:13 adam Exp $
#
# This Makefile should only be run on the NIS master server of a domain.
# All updated maps will be pushed to all NIS slave servers listed in the
@ -102,6 +102,7 @@ MASTER = $(MASTER_PASSWD)
YPSERVERS = $(YPDIR)/ypservers # List of all NIS servers for a domain
PUBLICKEY = $(YPSRCDIR)/publickey
NETID = $(YPSRCDIR)/netid
AMDHOST = $(YPSRCDIR)/amd.host
target:
@$(RM) $(NFILE)
@ -117,7 +118,8 @@ target:
#
all: master.passwd passwd hosts group networks protocols rpc \
services servers netid # aliases publickey netgrp ethers bootparam
services servers netid # aliases publickey netgrp ethers bootparam \
amd.host
ethers: ethers.byname ethers.byaddr
bootparam: bootparams
@ -485,3 +487,25 @@ master.passwd.byuid: $(MASTER)
@$(DBLOAD) -c
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
amd.host: $(AMDHOST)
@echo "Updating $@..."
@echo $@.$$$$ > $(NFILE)
$(CAT) $(AMDHOST) | \
$(AWK) '$$1 !~ "#" { \
for (i = 1; i <= NF; i++) \
if (i == NF) { \
if (substr($$i, length($$i), 1) == "\\") \
printf("%s", substr($$i, 1, length($$i) - 1)); \
else \
printf("%s\n", $$i); \
} \
else \
printf("%s ", $$i); \
}' | \
$(DBLOAD) -i $(AMDHOST) -o $(YPMAPDIR)/$@ - $(TMP)
@$(MV) $(TMP) $@
@$(DBLOAD) -c
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi