dfd3e690f9d80119e25e4e715b8f4081802d53c6
[dragonfly.git] / usr.sbin / lpr / chkprintcap / chkprintcap.8
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 .\"
28 .\" $FreeBSD: src/usr.sbin/lpr/chkprintcap/chkprintcap.8,v 1.3.2.4 2002/09/01 00:37:35 gad Exp $
29 .\" $DragonFly: src/usr.sbin/lpr/chkprintcap/chkprintcap.8,v 1.2 2003/06/17 04:29:55 dillon Exp $
30 .Dd November 30, 1997
31 .Dt CHKPRINTCAP 8
32 .Os
33 .Sh NAME
34 .Nm chkprintcap
35 .Nd check validity of entries in the print spooler database
36 .Sh SYNOPSIS
37 .Nm
38 .Op Fl d
39 .Op Fl f Ar printcap
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility scans a
44 .Xr printcap 5
45 database
46 (named by the
47 .Ar printcap
48 argument, or by default
49 .Pa /etc/printcap ) ,
50 looking for entries which are invalid in one way or another.
51 The following checks are currently implemented:
52 .Bl -enum -offset indent
53 .It
54 .Sq Li tc=
55 references were properly expanded
56 .It
57 .Sq Li tc=
58 references did not form a loop
59 .It
60 No two printers share the same spool directory
61 .Sq ( Li sd=
62 capability).
63 .El
64 .Pp
65 The
66 .Nm
67 utility exits with a status equal to the number of errors encountered before
68 processing stopped.  (In some cases, processing can stop before the
69 entire file is scanned.)
70 .Pp
71 If the
72 .Fl d
73 flag is given,
74 .Nm
75 will attempt to create any missing spool directories, giving them
76 .Sq Li u=rwx,go=rx
77 (0755) mode, group
78 .Sq Li daemon ,
79 and the owner specified by the
80 .Sq Li du=
81 capability in the database (default 1, which corresponds to user
82 .Sq Li daemon ) .
83 .Sh SEE ALSO
84 .Xr lpr 1 ,
85 .Xr printcap 5 ,
86 .Xr lpd 8
87 .Sh AUTHORS
88 The
89 .Nm
90 utility was written by
91 .An Garrett A. Wollman Aq wollman@lcs.mit.edu .
92 .Sh BUGS
93 Not enough sanity-checking is done.  At a minimum, the ownership and
94 mode of the spool directories should also be checked.  Other
95 parameters whose value could cause
96 .Xr lpd 8
97 to fail should be diagnosed.