Close PR #853. The services.byname case needs to greate keys in the form

'service/transport' (i.e. telnet/tcp) instead of just 'service.'
This commit is contained in:
Bill Paul 1995-12-09 19:25:00 +00:00
parent 44440ae8b2
commit 5028f8616a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12697

View File

@ -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