1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> |
---|
2 | <HTML> |
---|
3 | <HEAD> |
---|
4 | <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> |
---|
5 | <TITLE> LPRng-HOWTO: LPRng checkpc Utility</TITLE> |
---|
6 | <LINK HREF="LPRng-HOWTO-10.html" REL=next> |
---|
7 | <LINK HREF="LPRng-HOWTO-8.html" REL=previous> |
---|
8 | <LINK HREF="LPRng-HOWTO.html#toc9" REL=contents> |
---|
9 | </HEAD> |
---|
10 | <BODY> |
---|
11 | <A HREF="LPRng-HOWTO-10.html">Next</A> |
---|
12 | <A HREF="LPRng-HOWTO-8.html">Previous</A> |
---|
13 | <A HREF="LPRng-HOWTO.html#toc9">Contents</A> |
---|
14 | <HR> |
---|
15 | <H2><A NAME="checkpc"></A> <A NAME="s9">9. LPRng checkpc Utility</A></H2> |
---|
16 | |
---|
17 | <P>The <CODE>checkpc</CODE> (check printcap file) is one of the most |
---|
18 | useful utilities in the LPRng package. |
---|
19 | <P>It will read all the configuration files, printcap files and tests |
---|
20 | whether devices are set up correctly. Optionally, it will also set the |
---|
21 | permissions for spool directories and device files. Additionally, it |
---|
22 | will truncate the accounting and log files to a maximum size. Another |
---|
23 | use for <CODE>checkpc</CODE> is to remove old entries from queue |
---|
24 | directories. |
---|
25 | <P>For a new installation, you will want to run |
---|
26 | <BLOCKQUOTE><CODE> |
---|
27 | <PRE> |
---|
28 | checkpc -f -V |
---|
29 | </PRE> |
---|
30 | </CODE></BLOCKQUOTE> |
---|
31 | |
---|
32 | to set the permissions right. The <CODE>-f</CODE> flag instructs the |
---|
33 | program to correct file permissions. If you don't run this as |
---|
34 | <CODE>root</CODE>, you'll receive a warning about that fact and any |
---|
35 | <B>chown(2)</B> calls will (most likely) fail. |
---|
36 | <P>The program reports everything it changes. Since it isn't too clever |
---|
37 | about some things (visit the man page), you should keep an eye on the |
---|
38 | output, and run it again if needed. If it keeps failing, change the |
---|
39 | permissions yourself. |
---|
40 | <H2><A NAME="ss9.1">9.1 Maintenance</A> |
---|
41 | </H2> |
---|
42 | |
---|
43 | <P>Later, you will want to use <CODE>checkpc</CODE> for the daily |
---|
44 | maintenance of your system. I have this line in user <CODE>lp</CODE>'s |
---|
45 | crontab: |
---|
46 | <BLOCKQUOTE><CODE> |
---|
47 | <PRE> |
---|
48 | 32 5 * * * checkpc -t 10K -A3 -r >/dev/null 2>&1 |
---|
49 | </PRE> |
---|
50 | </CODE></BLOCKQUOTE> |
---|
51 | |
---|
52 | This job will: |
---|
53 | <OL> |
---|
54 | <LI>truncate all log and accounting files to 10KB (<CODE>-t 10K</CODE>). |
---|
55 | Actually, it will keep the last 10K from the file, starting on a |
---|
56 | complete line.</LI> |
---|
57 | <LI>remove all stale files older than three days (<CODE>-A3 -r</CODE>).</LI> |
---|
58 | </OL> |
---|
59 | |
---|
60 | I'm redirecting output to <CODE>/dev/null</CODE>, because <CODE>checkpc</CODE> |
---|
61 | is a little noisy to my taste. (But too noisy is better than too |
---|
62 | silent :) |
---|
63 | <H2><A NAME="ss9.2">9.2 Printcap Information</A> |
---|
64 | </H2> |
---|
65 | |
---|
66 | <P>You can use <CODE>checkpc -V -P</CODE> |
---|
67 | to examine printcaps and tell you what |
---|
68 | they contain. |
---|
69 | This is identical to the <CODE>lpc server all</CODE> operation, |
---|
70 | but with a higher level of verbosity. |
---|
71 | <HR> |
---|
72 | <A HREF="LPRng-HOWTO-10.html">Next</A> |
---|
73 | <A HREF="LPRng-HOWTO-8.html">Previous</A> |
---|
74 | <A HREF="LPRng-HOWTO.html#toc9">Contents</A> |
---|
75 | </BODY> |
---|
76 | </HTML> |
---|