diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp index 74bb41c079fd..43ecee25bad7 100644 --- a/usr.sbin/ypserv/Makefile.yp +++ b/usr.sbin/ypserv/Makefile.yp @@ -104,6 +104,7 @@ NETWORKS = $(YPSRCDIR)/networks PROTOCOLS = $(YPSRCDIR)/protocols RPC = $(YPSRCDIR)/rpc SERVICES = $(YPSRCDIR)/services +SHELLS = $(YPSRCDIR)/shells GROUP = $(YPSRCDIR)/group ALIASES = $(YPSRCDIR)/mail/aliases NETGROUP = $(YPDIR)/netgroup @@ -121,7 +122,7 @@ AMDHOST = $(YPSRCDIR)/amd.map # List of maps that are always built. # If you want to omit some of them, feel free to comment # them out from this list. -TARGETS= servers hosts networks protocols rpc services group +TARGETS= servers hosts networks protocols rpc services shells group #TARGETS+= aliases # Sanity checks: filter out targets we can't build @@ -179,6 +180,7 @@ networks: networks.byaddr networks.byname protocols: protocols.bynumber protocols.byname rpc: rpc.byname rpc.bynumber services: services.byname +shells: shells.list passwd: passwd.byname passwd.byuid group: group.byname group.bygid netgrp: netgroup @@ -240,7 +242,6 @@ ypservers: $(YPSERVERS) @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi - ethers.byname: $(ETHERS) @echo "Updating $@..." .if ${ETHERS} == "/dev/null" @@ -446,6 +447,15 @@ services.byname: $(SERVICES) @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi +shells.list: $(SHELLS) + @echo "Updating $@..." + $(CAT) $(SHELLS) | \ + $(AWK) '{ if ($$1 != "" && $$1 !~ "^#.*") print $$0"\t"$$0 }' $^ | \ + $(DBLOAD) -i $(SHELLS) -o $(YPMAPDIR)/$@ - $(TMP); \ + $(RMV) $(TMP) $@ + @$(DBLOAD) -c + @if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOMAIN) $@; fi + @if [ ! $(NOPUSH) ]; then echo "Pushed $@ map." ; fi publickey.byname: $(PUBLICKEY) @echo "Updating $@..."