-# $OpenBSD: Makefile,v 1.4 1996/05/30 09:52:58 deraadt Exp $
+# $OpenBSD: Makefile,v 1.5 1997/04/15 22:58:57 maja Exp $
-SUBDIR= makedbm mknetid stdethers stdhosts ypinit ypserv yptest yppush ypxfr
+SUBDIR= makedbm mknetid revnetgroup stdethers stdhosts \
+ ypinit ypserv yptest yppush ypxfr
.include <bsd.subdir.mk>
-# $OpenBSD: Makefile.main,v 1.5 1996/05/30 09:53:16 deraadt Exp $
+# $OpenBSD: Makefile.main,v 1.6 1997/04/15 22:58:58 maja Exp $
SUBDIR=
-passwd group hosts networks rpc services protocols netid: _SUBDIRUSE
+passwd group hosts ethers networks rpc services protocols netid netgroup: _SUBDIRUSE
.include <bsd.subdir.mk>
-# $OpenBSD: Makefile.yp,v 1.6 1997/03/13 09:50:26 maja Exp $
+# $OpenBSD: Makefile.yp,v 1.7 1997/04/15 22:58:59 maja Exp $
YPDBDIR=/var/yp
DIR=/etc
STDHOSTS=/usr/sbin/stdhosts
STDETHERS=/usr/sbin/stdethers
MKNETID=/usr/sbin/mknetid
+REVNETGROUP=/usr/sbin/revnetgroup
TOUCH=/usr/bin/touch
DOMAIN="`/usr/bin/basename ${.CURDIR}`"
YPPUSH=/usr/sbin/yppush
MAKEDBM-S=$(MAKEDBM) -s
UNSECURE="True"
-all: passwd group hosts ethers networks rpc services protocols netid
+all: passwd group hosts ethers networks rpc services protocols netid netgroup
passwd.time: $(DIR)/master.passwd
-@if [ -f $(>) ]; then \
fi
+netgroup.time: $(DIR)/netgroup
+ -@if [ -f $(>) ]; then \
+ $(CAT) $(>) | $(MAKEDBM) - netgroup; \
+ $(CAT) $(>) | $(REVNETGROUP) -u -f - | \
+ $(MAKEDBM) - netgroup.byuser; \
+ $(CAT) $(>) | $(REVNETGROUP) -h -f - | \
+ $(MAKEDBM) - netgroup.byhost; \
+ $(TOUCH) $(@); \
+ $(ECHO) "updated netgroup"; \
+ if [ ! $(NOPUSH) ]; then \
+ $(YPPUSH) -d $(DOMAIN) netgroup; \
+ $(YPPUSH) -d $(DOMAIN) netgroup.byuser; \
+ $(YPPUSH) -d $(DOMAIN) netgroup.byhost; \
+ $(ECHO) "pushed netgroup"; \
+ else \
+ : ; \
+ fi \
+ else \
+ $(ECHO) "couldn't find $(>)"; \
+ fi
+
+
passwd: passwd.time
group: group.time
hosts: hosts.time
services: services.time
protocols: protocols.time
netid: netid.time
+netgroup: netgroup.time
$(DIR)/passwd:
$(DIR)/group:
$(DIR)/hosts:
$(DIR)/protocols:
$(DIR)/netid:
$(DIR)/master.passwd:
+$(DIR)/netgroup:
+