Add a target for the creation of a /etc/shells map and add it to

the maps which are built by default.
This commit is contained in:
robert 2003-03-21 11:44:03 +00:00
parent 5b5eeab2fd
commit 8e2e191c15

View File

@ -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 $@..."