xref: /freebsd/usr.sbin/lpr/chkprintcap/chkprintcap.8 (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1.\" Copyright 1997 Massachusetts Institute of Technology
2.\"
3.\" Permission to use, copy, modify, and distribute this software and
4.\" its documentation for any purpose and without fee is hereby
5.\" granted, provided that both the above copyright notice and this
6.\" permission notice appear in all copies, that both the above
7.\" copyright notice and this permission notice appear in all
8.\" supporting documentation, and that the name of M.I.T. not be used
9.\" in advertising or publicity pertaining to distribution of the
10.\" software without specific, written prior permission.  M.I.T. makes
11.\" no representations about the suitability of this software for any
12.\" purpose.  It is provided "as is" without express or implied
13.\" warranty.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''.  M.I.T. DISCLAIMS
16.\" ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE,
17.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
19.\" SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21.\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22.\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26.\" SUCH DAMAGE.
27.Dd November 30, 1997
28.Dt CHKPRINTCAP 8
29.Os
30.Sh NAME
31.Nm chkprintcap
32.Nd check validity of entries in the print spooler database
33.Sh SYNOPSIS
34.Nm
35.Op Fl d
36.Op Fl f Ar printcap
37.Sh DESCRIPTION
38The
39.Nm
40utility scans a
41.Xr printcap 5
42database
43(named by the
44.Ar printcap
45argument, or by default
46.Pa /etc/printcap ) ,
47looking for entries which are invalid in one way or another.
48The following checks are currently implemented:
49.Bl -enum -offset indent
50.It
51.Sq Li tc=
52references were properly expanded
53.It
54.Sq Li tc=
55references did not form a loop
56.It
57No two printers share the same spool directory
58.Sq ( Li sd=
59capability).
60.El
61.Pp
62The
63.Nm
64utility exits with a status equal to the number of errors encountered before
65processing stopped.
66(In some cases, processing can stop before the
67entire file is scanned.)
68.Pp
69If the
70.Fl d
71flag is given,
72.Nm
73will attempt to create any missing spool directories, giving them
74.Sq Li u=rwx,go=rx
75(0755) mode, group
76.Sq Li daemon ,
77and the owner specified by the
78.Sq Li du=
79capability in the database (default 1, which corresponds to user
80.Sq Li daemon ) .
81.Sh SEE ALSO
82.Xr lpr 1 ,
83.Xr printcap 5 ,
84.Xr lpd 8
85.Sh AUTHORS
86The
87.Nm
88utility was written by
89.An Garrett A. Wollman Aq Mt wollman@lcs.mit.edu .
90.Sh BUGS
91Not enough sanity-checking is done.
92At a minimum, the ownership and
93mode of the spool directories should also be checked.
94Other
95parameters whose value could cause
96.Xr lpd 8
97to fail should be diagnosed.
98