1.\"	$NetBSD: netgroup_mkdb.8,v 1.7 2002/02/02 01:22:18 wiz Exp $
2.\"
3.\" Copyright (c) 1994 Christos Zoulas
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 Christos Zoulas.
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 February 3, 1994
32.Dt NETGROUP_MKDB 8
33.Os
34.Sh NAME
35.Nm netgroup_mkdb
36.Nd generate the netgroup database
37.Sh SYNOPSIS
38.Nm
39.Op Fl o Ar database
40.Op file
41.Sh DESCRIPTION
42.Nm
43creates a
44.Xr db 3
45database for the specified file.
46If no file is specified, then
47.Pa /etc/netgroup
48is used.
49This database is installed into
50.Pa /etc/netgroup.db .
51The file must be in the correct format (see
52.Xr netgroup 5 ) .
53.Pp
54The options are as follows:
55.Bl -tag -width indent
56.It Fl o Ar database
57Put the output databases in the named file.
58.El
59.Pp
60The databases are used by the C library netgroup routines (see
61.Xr getnetgrent 3 ) .
62.Pp
63.Nm
64exits zero on success, non-zero on failure.
65.Sh FILES
66.Bl -tag -width 24n -compact
67.It Pa /etc/netgroup.db
68The current netgroup database
69.It Pa /etc/netgroup.db.tmp
70A temporary file
71.It Pa /etc/netgroup
72The current netgroup file
73.El
74.Sh SEE ALSO
75.Xr db 3 ,
76.Xr getnetgrent 3 ,
77.Xr netgroup 5
78.Sh BUGS
79Because
80.Nm
81guarantees not to install a partial destination file it must
82build a temporary file in the same file system and if successful use
83.Xr rename 2
84to install over the destination file.
85.Pp
86If
87.Nm
88fails it will leave the previous version of the destination file intact.
89