-# $OpenBSD: Makefile,v 1.2 1996/05/30 09:53:34 deraadt Exp $
+# $OpenBSD: Makefile,v 1.3 1997/04/20 10:08:34 maja Exp $
PROG= ypxfr
SRCS= ypxfr.c ypdb.c yplog.c yplib_host.c ypxfr_xdr.c
MAN= ypxfr.8
+MLINKS= ypxfr.8 ypxfr_1perhour.8 \
+ ypxfr.8 ypxfr_2perday.8 \
+ ypxfr.8 ypxfr_1perday.8
+SCRIPTS= ypxfr_1perhour.sh ypxfr_2perday.sh ypxfr_1perday.sh
+
.PATH: ${.CURDIR}/../common
CFLAGS+=-I${.CURDIR}/../common
+beforeinstall:
+.for script in ${SCRIPTS}
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ ${.CURDIR}/${script} ${DESTDIR}${BINDIR}/${script:R}
+.endfor
+
.include <bsd.prog.mk>
-.\" $OpenBSD: ypxfr.8,v 1.4 1996/06/26 21:26:41 maja Exp $
+.\" $OpenBSD: ypxfr.8,v 1.5 1997/04/20 10:08:35 maja Exp $
.\" Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
.\" All rights reserved.
.\"
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: ypxfr.8,v 1.4 1996/06/26 21:26:41 maja Exp $
+.\" $OpenBSD: ypxfr.8,v 1.5 1997/04/20 10:08:35 maja Exp $
.\"
.Dd August 18, 1994
.Dt YPXFR 8
.Nm ypxfr
is the utiliy in YP that transfers maps to the local host.
.Pp
+Since the YP master transfers a map when it has changed, an YP slave should
+check for missed maps regulary. This can be done via an entry in
+.Xr crontab 5 .
+The scripts
+.Ar ypxfr_1perhour , ypxfr_2perday
+and
+.Ar ypxfr_1perday
+could be used for that.
.Pp
The options are as follows:
.Bl -tag -width indent
This option is only used by ypserv. This is to open communication with
an yppush on another host.
.El
+.Sh FILES
+.Bl -tag -width /usr/sbin/ypxfr_1perhour -compact
+.It Pa /usr/sbin/ypxfr_1perhour
+.It Pa /usr/sbin/ypxfr_2perday
+.It Pa /usr/sbin/ypxfr_1perday
+.El
.Sh SEE ALSO
.Xr yp 8 ,
.Xr yppush 8 ,
--- /dev/null
+#!/bin/sh
+# $OpenBSD: ypxfr_1perday.sh,v 1.1 1997/04/20 10:08:36 maja Exp $
+#
+# ypxfr_1perday.sh - YP maps to be updated daily
+#
+
+/usr/sbin/ypxfr group.byname
+/usr/sbin/ypxfr group.bygid
+/usr/sbin/ypxfr protocols.byname
+/usr/sbin/ypxfr protocols.bynumber
+/usr/sbin/ypxfr networks.byname
+/usr/sbin/ypxfr networks.byaddr
+/usr/sbin/ypxfr services.byname
+/usr/sbin/ypxfr rpc.bynumber
+/usr/sbin/ypxfr ypservers
+/usr/sbin/ypxfr amd.home
--- /dev/null
+#!/bin/sh
+# $OpenBSD: ypxfr_1perhour.sh,v 1.1 1997/04/20 10:08:37 maja Exp $
+#
+# ypxfr_1perhour.sh - YP maps to be updated every hour
+#
+
+/usr/sbin/ypxfr passwd.byname
+/usr/sbin/ypxfr passwd.byuid
+/usr/sbin/ypxfr master.passwd.byname
+/usr/sbin/ypxfr master.passwd.byuid
+/usr/sbin/ypxfr netid.byname
--- /dev/null
+#!/bin/sh
+# $OpenBSD: ypxfr_2perday.sh,v 1.1 1997/04/20 10:08:38 maja Exp $
+#
+# ypxfr_2perday.sh - YP maps to be updated twice a day
+#
+
+/usr/sbin/ypxfr hosts.byname
+/usr/sbin/ypxfr hosts.byaddr
+/usr/sbin/ypxfr ethers.byaddr
+/usr/sbin/ypxfr ethers.byname