diff options
| author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2015-12-18 11:20:50 +0000 | 
|---|---|---|
| committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2015-12-18 11:20:50 +0000 | 
| commit | 4ba79bb43371ac99795d37a1b11984fb2aef65b6 (patch) | |
| tree | af094c5c229fc48f20d5f3286e732104f4ce7f8c | |
| parent | 16e125b52194abb8acbeaf3ae7eb6127c8256a00 (diff) | |
Notes
| -rw-r--r-- | usr.sbin/ypserv/Makefile.yp | 15 | 
1 files changed, 13 insertions, 2 deletions
| diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp index fc207b6a8c259..17f8e37b663bc 100644 --- a/usr.sbin/ypserv/Makefile.yp +++ b/usr.sbin/ypserv/Makefile.yp @@ -387,9 +387,20 @@ netgroup.byuser: $(NETGROUP)  .endif +# Solaris 8 does the following: +# - /etc/hosts and hosts.{byname,byaddr} are IPv4 only. +# - /etc/inet/ipnodes and ipnodes.{byname,byaddr} are used for protocol +#   independent name-to-address mapping. +# +# For local name resolution, we made /etc/hosts protocol independent. +# For NIS name resolution, we obey Solaris 8 practice. +# - We keep hosts.{byname,byaddr} IPv4 only, to be friendly with Solaris 8 +#   clients. +# - ipnodes.{byname,byaddr} is used for protocol independent mapping. +#  hosts.byname: $(HOSTS)  	@echo "Updating $@..." -	@$(AWK) '/^[0-9]/ { for (n=2; n<=NF && $$n !~ "^#.*"; n++) \ +	@$(AWK) '/^[0-9.]+[\t ]/ { for (n=2; n<=NF && $$n !~ "^#.*"; n++) \  		print $$n"\t"$$0 }' $(HOSTS) | $(DBLOAD) ${B} -i $(HOSTS)  \  		-o $(YPMAPDIR)/$@ - $(TMP); $(RMV) $(TMP) $@  	@$(DBLOAD) -c @@ -399,7 +410,7 @@ hosts.byname: $(HOSTS)  hosts.byaddr: $(HOSTS)  	@echo "Updating $@..." -	@$(AWK) '$$1 !~ "^#.*" { print $$1"\t"$$0 }' $(HOSTS) \ +	@$(AWK) '/^[0-9.]+[\t ]/ { print $$1"\t"$$0 }' $(HOSTS) \  		| $(DBLOAD) ${B} -i $(HOSTS) -o $(YPMAPDIR)/$@ - $(TMP); \  		$(RMV) $(TMP) $@  	@$(DBLOAD) -c | 
