xref: /netbsd/usr.bin/ypwhich/ypwhich.1 (revision c4a72b64)
1.\" $NetBSD: ypwhich.1,v 1.11 2002/10/02 10:34:45 wiz Exp $
2.\"
3.\" Copyright (c) 1994 Christopher G. Demetriou
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"      This product includes software developed by Christopher G. Demetriou.
17.\" 4. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.Dd November 4, 1997
32.Dt YPWHICH 1
33.Os
34.Sh NAME
35.Nm ypwhich
36.Nd return hostname of YP server of map master
37.Sh SYNOPSIS
38.Nm
39.Op Fl d Ar domain
40.Oo
41.Op Fl h
42.Ar host
43.Oc
44.Nm ""
45.Op Fl d Ar domain
46.Op Fl h Ar host
47.Op Fl f
48.Op Fl t
49.Fl m Op Ar mname
50.Nm ""
51.Fl x
52.Sh DESCRIPTION
53.Nm
54tells which
55.Tn YP
56server supplies
57.Tn YP
58services to a client, or which is the master for a map.
59If invoked without arguments, it gives the
60.Tn YP
61server for the local machine.
62If
63.Ar host
64is specified, that machine is queried to find out which
65.Tn YP
66server it is using.
67.Pp
68The options are as follows:
69.Bl -tag -width Fl
70.It Fl d Ar domain
71Specify a domain other than the default domain.
72.It Fl h Ar host
73Specify a host other than localhost to query for information.
74.It Fl f
75When used in conjunction with
76.Fl m ,
77force
78.Nm
79to query
80.Ar host
81directly, without using the local copy of
82.Xr ypbind 8 .
83.It Fl t
84Inhibit translation of map nicknames
85to their corresponding map names.
86.It Fl m Op Ar mname
87Find the master
88.Tn YP
89server for the named map.
90.Ar mname
91can be a map name or nickname.
92If
93.Ar mname
94is omitted,
95.Nm
96will produce a list of available maps.
97.It Fl x
98Display the map nickname table.
99.El
100.Pp
101.Nm
102exits with a non-zero exit code if
103.Fl m
104is used, and there was a problem in determining the map's master.
105.Sh SEE ALSO
106.Xr domainname 1 ,
107.Xr ypcat 1 ,
108.Xr ypmatch 1 ,
109.Xr yp 8 ,
110.Xr ypbind 8 ,
111.Xr yppoll 8 ,
112.Xr ypset 8
113.Sh AUTHORS
114.An Charles D. Cranor
115