aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1996-07-25 19:32:37 +0000
committerPeter Wemm <peter@FreeBSD.org>1996-07-25 19:32:37 +0000
commit88b4ff3c6cce549315cfd071535322b3bb5118fc (patch)
tree66af7130aa0408f09f74a125603b56edf89a39e2 /usr.sbin
parent74fa81dc529d12a52155f420e30b777f561467d4 (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/Makefile.yp10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp
index 38e968f283b4..0a184b083629 100644
--- a/usr.sbin/ypserv/Makefile.yp
+++ b/usr.sbin/ypserv/Makefile.yp
@@ -1,7 +1,7 @@
#
# Makefile for the NIS databases
#
-# $Id: Makefile.yp,v 1.9 1996/07/24 10:48:07 peter Exp $
+# $Id: Makefile.yp,v 1.10 1996/07/24 14:04:57 peter 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
@@ -369,9 +369,11 @@ services.byname: $(SERVICES)
@echo $@.$$$$ > $(NFILE)
$(CAT) $(SERVICES) | \
$(AWK) \
- '$$1 !~ "#" { if (index($$2,"udp")) { printf("%s/udp",$$1) } \
- else { printf("%s/tcp",$$1) }; print "\t"$$0 ; \
- print $$2"\t"$$0 ; \
+ '$$1 !~ "#" { for (n=1; n<=NF && $$n !~ "#"; n++) { \
+ if (index($$2,"udp")) { printf("%s/udp",$$n) } \
+ else { printf("%s/tcp",$$n) }; print "\t"$$0 ; \
+ if (n == 1) n = 2; \
+ } ; print $$2"\t"$$0 ; \
}' $^ | $(DBLOAD) -i $(SERVICES) -o $(YPMAPDIR)/$@ - $(TMP)
@$(MV) $(TMP) $@
@$(DBLOAD) -c