summaryrefslogtreecommitdiffstats
path: root/gnu/usr.sbin
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-03-05 22:48:50 +0000
committerwpaul <wpaul@FreeBSD.org>1995-03-05 22:48:50 +0000
commit74e86179dfe3b7a3937399fa625138c016c9436b (patch)
treec5a2d097a7f6902ec2a0593ce12e1c95beb72a9d /gnu/usr.sbin
parent3c6939a4436cce422f8b706896e3f3b72904ae76 (diff)
downloadFreeBSD-src-74e86179dfe3b7a3937399fa625138c016c9436b.zip
FreeBSD-src-74e86179dfe3b7a3937399fa625138c016c9436b.tar.gz
Added support for bootparams map.
Diffstat (limited to 'gnu/usr.sbin')
-rw-r--r--gnu/usr.sbin/ypserv/Makefile.yp33
1 files changed, 23 insertions, 10 deletions
diff --git a/gnu/usr.sbin/ypserv/Makefile.yp b/gnu/usr.sbin/ypserv/Makefile.yp
index d03c613..5d8ea20 100644
--- a/gnu/usr.sbin/ypserv/Makefile.yp
+++ b/gnu/usr.sbin/ypserv/Makefile.yp
@@ -1,7 +1,7 @@
#
# Makefile for the NIS database
#
-# $Id: Makefile.yp,v 1.3 1995/02/03 01:11:57 wpaul Exp $
+# $Id: Makefile.yp,v 1.4 1995/02/04 00:13:21 wpaul 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
@@ -59,7 +59,8 @@ DOMAINNAME = `/bin/domainname`
# To add a user, edit /var/yp/master.passwd and type 'make'. The raw
# passwd file will be generated from the master.passwd file automagically.
#
-ETHERS = /etc/ethers # ethernet addresses (for rarp)
+ETHERS = /etc/ethers # ethernet addresses (for rarpd)
+BOOTPARAMS= /etc/bootparams # for booting Sun boxes (for bootparamd)
HOSTS = /etc/hosts
NETWORKS = /etc/networks
PROTOCOLS = /etc/protocols
@@ -68,7 +69,7 @@ SERVICES = /etc/services
GROUP = /etc/group
PASSWD = /var/yp/passwd
MASTER = /var/yp/master.passwd
-YPSERVERS = /var/yp/ypservers # Lists NIS master and slaves for a domain
+YPSERVERS = /var/yp/ypservers # List of all NIS servers for a domain
target:
@if [ ! -d `domainname` ]; then mkdir `domainname`; fi; \
@@ -76,13 +77,15 @@ target:
# If you don't want some of these maps built, feel free to comment
# them out from this list.
-# Note that we don't build an ethers map by default since FreeBSD
-# doesn't have a rarpd (yet).
+# Note that we don't build the ethers or boorparams maps by default
+# since /etc/ethers and /etc/bootparams are not likely to be present
+# on all systems.
#
all: hosts networks protocols rpc services passwd group netid master.passwd \
- servers # ethers
+ servers # ethers bootparam
ethers: ethers.byname ethers.byaddr
+bootparam: bootparams
hosts: hosts.byname hosts.byaddr
networks: networks.byaddr networks.byname
protocols: protocols.bynumber protocols.byname
@@ -108,8 +111,8 @@ ethers.byname: $(ETHERS)
@echo "Updating $@..."
$(RM) $@
$(CAT) $(ETHERS) | \
- $(AWK) '{ if ($$1 != "" && $$1 != "#") print $$2"\t"$$0 }' $^ \
- | $(DBLOAD) - $@
+ $(AWK) '{ if ($$1 != "" && $$1 != "#" && $$1 != "+") \
+ print $$0"\t"$$0 }' $^ | $(DBLOAD) - $@
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
@@ -118,8 +121,18 @@ ethers.byaddr: $(ETHERS)
@echo "Updating $@..."
$(RM) $@
$(CAT) $(ETHERS) | \
- $(AWK) '{ if ($$1 != "" && $$1 != "#") print $$1"\t"$$0 }' $^ \
- | $(DBLOAD) - $@
+ $(AWK) '{ if ($$1 != "" && $$1 != "#" && $$1 != "+") \
+ print $$0"\t"$$0 }' $^ | $(DBLOAD) - $@
+ @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
+ @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
+
+
+bootparams: $(BOOTPARAMS)
+ @echo "Updating $@..."
+ $(RM) $@
+ $(CAT) $(BOOTPARAMS) | \
+ $(AWK) '{ if ($$1 != "" && $$1 != "#" && $$1 != "+") \
+ print $$0"\t"$$0 }' $^ | $(DBLOAD) - $@
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
OpenPOWER on IntegriCloud