diff options
author | Mats O Jansson <maja@cvs.openbsd.org> | 1997-04-20 10:08:39 +0000 |
---|---|---|
committer | Mats O Jansson <maja@cvs.openbsd.org> | 1997-04-20 10:08:39 +0000 |
commit | 4613101d6ba7f71ad6614ec7ddfaf151aa917660 (patch) | |
tree | 5153444a64e1062bff8656781c5c7da7d494bf01 | |
parent | bfa71ddd2838e30ca99115b407bc506717f55041 (diff) |
Added scripts to be used from cron to make sure a slave server is up to date.
-moj
-rw-r--r-- | usr.sbin/ypserv/ypxfr/Makefile | 13 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr.8 | 18 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr_1perday.sh | 16 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr_1perhour.sh | 11 | ||||
-rw-r--r-- | usr.sbin/ypserv/ypxfr/ypxfr_2perday.sh | 10 |
5 files changed, 65 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/ypxfr/Makefile b/usr.sbin/ypserv/ypxfr/Makefile index 82a6f633857..fe1a3ceff79 100644 --- a/usr.sbin/ypserv/ypxfr/Makefile +++ b/usr.sbin/ypserv/ypxfr/Makefile @@ -1,9 +1,20 @@ -# $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> diff --git a/usr.sbin/ypserv/ypxfr/ypxfr.8 b/usr.sbin/ypserv/ypxfr/ypxfr.8 index 58db984a9b0..5a78dadaf8b 100644 --- a/usr.sbin/ypserv/ypxfr/ypxfr.8 +++ b/usr.sbin/ypserv/ypxfr/ypxfr.8 @@ -1,4 +1,4 @@ -.\" $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. .\" @@ -28,7 +28,7 @@ .\" 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 @@ -48,6 +48,14 @@ .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 @@ -70,6 +78,12 @@ Specify a source domain other than the target domain. 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 , diff --git a/usr.sbin/ypserv/ypxfr/ypxfr_1perday.sh b/usr.sbin/ypserv/ypxfr/ypxfr_1perday.sh new file mode 100644 index 00000000000..578c268557b --- /dev/null +++ b/usr.sbin/ypserv/ypxfr/ypxfr_1perday.sh @@ -0,0 +1,16 @@ +#!/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 diff --git a/usr.sbin/ypserv/ypxfr/ypxfr_1perhour.sh b/usr.sbin/ypserv/ypxfr/ypxfr_1perhour.sh new file mode 100644 index 00000000000..82f43a22a5e --- /dev/null +++ b/usr.sbin/ypserv/ypxfr/ypxfr_1perhour.sh @@ -0,0 +1,11 @@ +#!/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 diff --git a/usr.sbin/ypserv/ypxfr/ypxfr_2perday.sh b/usr.sbin/ypserv/ypxfr/ypxfr_2perday.sh new file mode 100644 index 00000000000..0905270424b --- /dev/null +++ b/usr.sbin/ypserv/ypxfr/ypxfr_2perday.sh @@ -0,0 +1,10 @@ +#!/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 |