diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-02-05 21:48:04 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-02-05 21:48:04 +0000 |
commit | f40cd239b01d3db91132ae33d5d1868f1bd4efc3 (patch) | |
tree | 9dbbf2f46668f98889c877065f8145b286a6d33c | |
parent | 58be14ac2d689b3a51677eb065e5f1dacaa7a3a7 (diff) | |
download | FreeBSD-src-f40cd239b01d3db91132ae33d5d1868f1bd4efc3.zip FreeBSD-src-f40cd239b01d3db91132ae33d5d1868f1bd4efc3.tar.gz |
Wrote manual page for yppush and edited Makefile to install it.
Added conditional definition for _PATH_YP in yppush.c in case _PATH_YP
isn't defined anywhere else.
-rw-r--r-- | gnu/usr.bin/yppush/Makefile | 5 | ||||
-rw-r--r-- | gnu/usr.bin/yppush/yppush.8 | 115 | ||||
-rw-r--r-- | gnu/usr.bin/yppush/yppush.c | 25 |
3 files changed, 121 insertions, 24 deletions
diff --git a/gnu/usr.bin/yppush/Makefile b/gnu/usr.bin/yppush/Makefile index 0306b62..67cf051 100644 --- a/gnu/usr.bin/yppush/Makefile +++ b/gnu/usr.bin/yppush/Makefile @@ -1,10 +1,7 @@ PROG= yppush -MAN8= +MAN8= yppush.8 SRCS= yppush.c yppush_s.c yp_clnt.c yp_xdr.c ypclnt.c -BINOWN= bin -BINMODE=555 - .include <bsd.prog.mk> diff --git a/gnu/usr.bin/yppush/yppush.8 b/gnu/usr.bin/yppush/yppush.8 new file mode 100644 index 0000000..92e1405 --- /dev/null +++ b/gnu/usr.bin/yppush/yppush.8 @@ -0,0 +1,115 @@ +.\" Copyright (c) 1991, 1993, 1995 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $Id$ +.\" +.Dd February 5, 1995 +.Dt YPPUSH 8 +.Os +.Sh NAME +.Nm yppush +.Nd "force propagation of updated NIS databases" +.Sh SYNOPSIS +.Nm yppush +.Op Fl d Ar domain +.Op Fl v +.Ar mapname +.Op Ar mapname ... +.Sh DESCRIPTION +.Nm yppush +distributes updated NIS databases (or +.Pa maps ) +from an NIS master server to NIS slave servers within an NIS +domain. It is normally only run on the NIS master by +.Pa /var/yp/Makefile +whenever any of the NIS maps are updated. Note that +.Pa /var/yp/Makefile +does not invoke +.Nm yppush +by default: the +.Nm NOPUSH=True +entry in the Makefile must first be commented out +(the default FreeBSD configuration assumes a small network with only +a single NIS server; in such a configuration, +.Nm yppush +is not needed). +.Pp +.Nm yppush +determines the names of the slave servers for a domain by searching the +.Pa ypservers +map. Once it has a complete list of slave servers, it sends a request +to each of them to initiate a map transfer, which is done using +.Xr ypxfr 8 . +Included within each request is the name of the map to be copied +and some special information required by +.Xr ypxfr 8 +to successfully 'callback' to +.Nm yppush +and carry out the transfer. Any status or error messages +.Nm yppush +receives from +.Xr ypxfr 8 +will be printed to stdout. +.Sh OPTIONS +The following options are supported by +.Nm yppush : +.Bl -tag -width flag +.It Fl d Ar domain +Specify a particular domain. The NIS domain of +the host system is used by default. +.It Fl v +Verbose mode: causes +.Nm yppush +to print debugging messages as it runs. +.Sh FILES +.Bl -tag -width Pa -compact +.It Pa /var/yp/[domainname]/ypservers +The NIS ypservers map containing the names of all servers in +a particular NIS domain. +.El +.Sh SEE ALSO +.Xr ypserv 8 , +.Xr ypxfr 8 , +.Xr yp 8 +.Sh BUGS +The mechanism for transfering NIS maps in NIS version 1 is different +that that in NIS version 2. This version of +.Nm yppush +has support for transfering maps to NIS version 1 systems, but this +support has not been tested and is not guaranteed to work. Fortunately, +the majority of systems today use NIS version 2. +.Sh LICENSE +This program is covered by the GNU Public License version 2. +.Sh AUTHOR +Tobias Reber (original Linux version) +.br +Bill Paul <wpaul@ctr.columbia.edu> (port to FreeBSD and various +changes) diff --git a/gnu/usr.bin/yppush/yppush.c b/gnu/usr.bin/yppush/yppush.c index 5ca5898..85900a3 100644 --- a/gnu/usr.bin/yppush/yppush.c +++ b/gnu/usr.bin/yppush/yppush.c @@ -18,27 +18,8 @@ Modified for use with FreeBSD 2.x by Bill Paul (wpaul@ctr.columbia.edu) - $Id$ + $Id: yppush.c,v 1.1 1995/01/31 09:47:10 wpaul Exp $ */ -/* - * $Author: root $ - * $Log: yppush.c,v $ - * Revision 2.0 1994/01/06 16:58:08 root - * Version 2.0 - * - * Revision 1.4 1994/01/02 23:00:59 root - * Use -v flag - * - * Revision 1.3 1994/01/02 21:59:08 root - * Strict prototypes - * - * Revision 1.2 1994/01/02 20:10:08 root - * Added GPL notice - * - * Revision 1.1 1994/01/02 18:04:08 root - * Initial revision - * - */ #include <stdio.h> #include <stdlib.h> @@ -69,6 +50,10 @@ struct dom_binding { #include <limits.h> #include <sys/stat.h> +#ifndef _PATH_YP +#define _PATH_YP "/var/yp" +#endif + #define PERM_SECURE (S_IRUSR|S_IWUSR) HASHINFO openinfo = { 4096, /* bsize */ |