diff options
author | Mats O Jansson <maja@cvs.openbsd.org> | 1997-07-26 22:23:46 +0000 |
---|---|---|
committer | Mats O Jansson <maja@cvs.openbsd.org> | 1997-07-26 22:23:46 +0000 |
commit | 1bd96ae5092e034e2f8c1f9a5400e3b4868750fc (patch) | |
tree | 5985e2afb8e58ea5717552422868b432d1debd7c /usr.sbin | |
parent | e5c2751e65f8d8ef730519611bfc386682e34b69 (diff) |
Ok, the final part in the support for mail.aliases and mail.byaddr in
ypserv.
For this to have an effect the following must be done.
1) make install in src/usr.sbin/ypserv/ypinit will update
/var/yp/Makefile.main.dist and /var/yp/Makefile.yp.dist.
2) merge changes from Makefile.main.dist into Makefile and Makefile.main
in /var/yp. Don't forget to keep the SUBDIR line from Makefile.
3) merge changes from Makefile.yp.dist into Makefile.yp in /var/yp and
Makefile in any domains directory. If no local maps exists it's normaly
just to replace the files.
-moj
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ypserv/ypinit/Makefile.main | 4 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypinit/Makefile.yp | 32 |
2 files changed, 32 insertions, 4 deletions
diff --git a/usr.sbin/ypserv/ypinit/Makefile.main b/usr.sbin/ypserv/ypinit/Makefile.main index 5f50bbb1663..c882886ef3c 100644 --- a/usr.sbin/ypserv/ypinit/Makefile.main +++ b/usr.sbin/ypserv/ypinit/Makefile.main @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile.main,v 1.7 1997/04/20 10:00:21 maja Exp $ +# $OpenBSD: Makefile.main,v 1.8 1997/07/26 22:23:44 maja Exp $ SUBDIR= -passwd group hosts ethers networks rpc services protocols netid netgroup amd.home : _SUBDIRUSE +passwd group hosts ethers networks rpc services protocols netid netgroup amd.home aliases : _SUBDIRUSE .include <bsd.subdir.mk> diff --git a/usr.sbin/ypserv/ypinit/Makefile.yp b/usr.sbin/ypserv/ypinit/Makefile.yp index bd009c988e6..6f13bc7a510 100644 --- a/usr.sbin/ypserv/ypinit/Makefile.yp +++ b/usr.sbin/ypserv/ypinit/Makefile.yp @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.yp,v 1.8 1997/04/20 10:00:22 maja Exp $ +# $OpenBSD: Makefile.yp,v 1.9 1997/07/26 22:23:45 maja Exp $ YPDBDIR=/var/yp DIR=/etc @@ -7,12 +7,16 @@ NOPUSH="" # AWK=/usr/bin/awk CAT=/bin/cat +CP=/bin/cp +RM=/bin/rm CUT=/usr/bin/cut ECHO=/bin/echo MAKEDBM=/usr/sbin/makedbm SED=/usr/bin/sed +SENDMAIL=/usr/sbin/sendmail STDHOSTS=/usr/sbin/stdhosts STDETHERS=/usr/sbin/stdethers +MKALIAS=/usr/sbin/mkalias MKNETID=/usr/sbin/mknetid REVNETGROUP=/usr/sbin/revnetgroup TOUCH=/usr/bin/touch @@ -26,7 +30,7 @@ YPPUSH=/usr/sbin/yppush MAKEDBM-S=$(MAKEDBM) -s UNSECURE="True" -all: passwd group hosts ethers networks rpc services protocols netid netgroup amd.home +all: passwd group hosts ethers networks rpc services protocols netid netgroup amd.home aliases passwd.time: $(DIR)/master.passwd -@if [ -f $(>) ]; then \ @@ -271,6 +275,28 @@ amd.home.time: $(AMDDIR)/amd.home fi +aliases.time: $(DIR)/aliases + -@if [ -f $(>) ]; then \ + $(CP) -p $(>) $(DOMAIN)-aliases; \ + $(SENDMAIL) -bi -oA$(PWD)/$(DOMAIN)-aliases; \ + $(MAKEDBM) -U $(DOMAIN)-aliases | $(MAKEDBM) - mail.aliases; \ + $(MKALIAS) mail.aliases mail.byaddr; \ + $(TOUCH) $(@); \ + $(RM) $(DOMAIN)-aliases.db $(DOMAIN)-aliases; \ + $(ECHO) "updated aliases"; \ + if [ ! $(NOPUSH) ]; then \ + $(YPPUSH) -d $(DOMAIN) mail.aliases; \ + $(YPPUSH) -d $(DOMAIN) mail.byaddr; \ + $(ECHO) "pushed aliases"; \ + else \ + : ; \ + fi \ + else \ + $(ECHO) "couldn't find $(>)"; \ + fi + + + passwd: passwd.time group: group.time hosts: hosts.time @@ -282,6 +308,7 @@ protocols: protocols.time netid: netid.time netgroup: netgroup.time amd.home: amd.home.time +aliases: aliases.time $(DIR)/passwd: $(DIR)/group: $(DIR)/hosts: @@ -293,4 +320,5 @@ $(DIR)/protocols: $(DIR)/netid: $(DIR)/master.passwd: $(DIR)/netgroup: +$(DIR)/aliases: $(AMDDIR)/amd.home: |