summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2003-03-21 11:44:03 +0000
committerrobert <robert@FreeBSD.org>2003-03-21 11:44:03 +0000
commit8e2e191c15b45de7dbc43e21b487df7022168cb4 (patch)
tree67727960d194faba9aa76fa07628ed6f7ada2e88
parent5b5eeab2fd8dc0ce4ccdf29ab0d72aff9250a38d (diff)
downloadFreeBSD-src-8e2e191c15b45de7dbc43e21b487df7022168cb4.zip
FreeBSD-src-8e2e191c15b45de7dbc43e21b487df7022168cb4.tar.gz
Add a target for the creation of a /etc/shells map and add it to
the maps which are built by default.
-rw-r--r--usr.sbin/ypserv/Makefile.yp14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/ypserv/Makefile.yp b/usr.sbin/ypserv/Makefile.yp
index 74bb41c..43ecee2 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 $@..."
OpenPOWER on IntegriCloud