summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1995-12-09 19:25:00 +0000
committerwpaul <wpaul@FreeBSD.org>1995-12-09 19:25:00 +0000
commit54aaf5fd0cd00ce811d0bd735efe7b41925c43e4 (patch)
tree6744ab818c9b7048267c1d7f96de9e2a3b68c1c0 /gnu
parent2718bdefe398c9b77208ec75335928471f1166b5 (diff)
downloadFreeBSD-src-54aaf5fd0cd00ce811d0bd735efe7b41925c43e4.zip
FreeBSD-src-54aaf5fd0cd00ce811d0bd735efe7b41925c43e4.tar.gz
Close PR #853. The services.byname case needs to greate keys in the form
'service/transport' (i.e. telnet/tcp) instead of just 'service.'
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.sbin/ypserv/Makefile.yp7
1 files changed, 3 insertions, 4 deletions
diff --git a/gnu/usr.sbin/ypserv/Makefile.yp b/gnu/usr.sbin/ypserv/Makefile.yp
index beb46e8..b697070 100644
--- a/gnu/usr.sbin/ypserv/Makefile.yp
+++ b/gnu/usr.sbin/ypserv/Makefile.yp
@@ -1,7 +1,7 @@
#
# Makefile for the NIS databases
#
-# $Id: Makefile.yp,v 1.7.4.1 1995/08/25 11:18:36 davidg Exp $
+# $Id: Makefile.yp,v 1.12 1995/10/26 18:00:35 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
@@ -293,9 +293,8 @@ services.byname: $(SERVICES)
$(RM) $@
$(CAT) $(SERVICES) | \
$(AWK) \
- '$$1 !~ "#" { print $$1"\t"$$0; \
- for (n=3; n<=NF && $$n !~ "#"; n++) \
- print $$n"\t"$$0 \
+ '$$1 !~ "#" { if (index($$2,"udp")) { printf("%s/udp",$$1) } \
+ else { printf("%s/tcp",$$1) }; print "\t"$$0 \
}' $^ | $(DBLOAD) -i $(SERVICES) -o $(YPMAPDIR)/$@ - $@
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi
@if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi
OpenPOWER on IntegriCloud