summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ypserv/Makefile.yp12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp
index f18b5fe..f7ef27e 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.3 1998/02/04 16:07:20 wpaul Exp $
+# $Id: Makefile.yp,v 1.20 1998/02/04 16:16:58 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
@@ -436,10 +436,12 @@ services.byname: $(SERVICES)
$(CAT) $(SERVICES) | \
$(AWK) \
'$$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 ; \
+ if (split($$2, t, "/")) { \
+ printf("%s/%s", $$n, t[2]) }; \
+ print "\t"$$0;
+ if (n == 1) n = 2; \
+ }
+ } ; print $$2"\t"$$0 ; \
}' $^ | $(DBLOAD) -i $(SERVICES) -o $(YPMAPDIR)/$@ - $(TMP); \
$(RMV) $(TMP) $@
@$(DBLOAD) -c
OpenPOWER on IntegriCloud