1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2 3<html> 4 <head> 5 <meta name="generator" content="HTML Tidy, see www.w3.org"> 6 <title>Single Printcap File for Large Installation</title> 7 <meta name="GENERATOR" content= 8 "Modular DocBook HTML Stylesheet Version 1.7"> 9 <link rel="HOME" title=" LPRng Reference Manual" href= 10 "index.htm"> 11 <link rel="UP" title="Printcap Database " href= 12 "printcapref.htm"> 13 <link rel="PREVIOUS" title="Locations of Printcap Files " href= 14 "printcappath.htm"> 15 <link rel="NEXT" title= 16 "Management Strategies for Large Installations" href= 17 "x6118.htm"> 18 </head> 19 20 <body class="SECT1" bgcolor="#FFFFFF" text="#000000" link= 21 "#0000FF" vlink="#840084" alink="#0000FF"> 22 <div class="NAVHEADER"> 23 <table summary="Header navigation table" width="100%" border= 24 "0" cellpadding="0" cellspacing="0"> 25 <tr> 26 <th colspan="3" align="center">LPRng Reference Manual: 5 27 Sep 2003 (For LPRng-3.8.22)</th> 28 </tr> 29 30 <tr> 31 <td width="10%" align="left" valign="bottom"><a href= 32 "printcappath.htm" accesskey="P">Prev</a></td> 33 34 <td width="80%" align="center" valign="bottom">Chapter 35 12. Printcap Database</td> 36 37 <td width="10%" align="right" valign="bottom"><a href= 38 "x6118.htm" accesskey="N">Next</a></td> 39 </tr> 40 </table> 41 <hr align="LEFT" width="100%"> 42 </div> 43 44 <div class="SECT1"> 45 <h1 class="SECT1"><a name="SECOH">12.16. Single Printcap File 46 for Large Installation</a></h1> 47 48 <p>One of the major problems faced by administrators of large 49 sites is how to distribute printcap information. They would 50 like to have a single printcap file either distributed by a 51 file server (NFS) or by some other method such as <var class= 52 "LITERAL">rdist</var>. By using the <var class= 53 "LITERAL">server</var> and <var class="LITERAL">oh</var> 54 tags, information for the specific sites can be separated 55 out. For example:</p> 56 57 <div class="INFORMALEXAMPLE"> 58 <a name="AEN6098"></a> 59<pre class="SCREEN"> 60 # printcap 61 pr1:lp=pr1@serverhost1:oh=*.eng.site.com,130.191.12.0/24 62 pr2:lp=pr1@serverhost1:oh=*.eng.site.com,130.191.12.0/24 63 pr1:lp=pr2@serverhost2:oh=*.admin.site.com 64 pr2:lp=pr2@serverhost2:oh=*.admin.site.com 65 pr1:server:oh=serverhost1.eng.com:lp=/dev/lp:tc=.common 66 pr2:server:oh=serverhost2.admin.com:lp=/dev/lp:tc=.common 67 .common:sd=/usr/local/lpd/%P 68</pre> 69 </div> 70 <br> 71 <br> 72 73 <p>The above example has some interesting effects. The <var 74 class="LITERAL">pattern</var> is used as a <span class= 75 "emphasis"><i class="EMPHASIS">glob</i></span> pattern and is 76 applied to the fully qualified domain name (FQDN) of the host 77 reading the printcap file. For example, <tt class= 78 "FILENAME">*.eng.site.com</tt> would match host <tt class= 79 "FILENAME">h1.eng.site.com</tt> but would not match <tt 80 class="FILENAME">h1.admin.site.com</tt>. Thus, the effects of 81 the first couple of entries would be to specify that the <var 82 class="LITERAL">pr1</var> and <var class="LITERAL">pr2</var> 83 printers on the <var class="LITERAL">eng</var> hosts would be 84 <var class="LITERAL">pr1@serverhost1</var>, and on the <var 85 class="LITERAL">admin</var> hosts would be <var class= 86 "LITERAL">pr2@serverhost2</var>,</p> 87 88 <p>Also, the lpd daemons on <var class= 89 "LITERAL">serverhost1</var> and <var class= 90 "LITERAL">serverhost2</var> would extract the additional 91 information for <var class="LITERAL">pr1</var> and <var 92 class="LITERAL">pr2</var> respectively, overriding the common 93 <var class="LITERAL">lp</var> entries.</p> 94 </div> 95 96 <div class="NAVFOOTER"> 97 <hr align="LEFT" width="100%"> 98 99 <table summary="Footer navigation table" width="100%" border= 100 "0" cellpadding="0" cellspacing="0"> 101 <tr> 102 <td width="33%" align="left" valign="top"><a href= 103 "printcappath.htm" accesskey="P">Prev</a></td> 104 105 <td width="34%" align="center" valign="top"><a href= 106 "index.htm" accesskey="H">Home</a></td> 107 108 <td width="33%" align="right" valign="top"><a href= 109 "x6118.htm" accesskey="N">Next</a></td> 110 </tr> 111 112 <tr> 113 <td width="33%" align="left" valign="top">Locations of 114 Printcap Files</td> 115 116 <td width="34%" align="center" valign="top"><a href= 117 "printcapref.htm" accesskey="U">Up</a></td> 118 119 <td width="33%" align="right" valign="top">Management 120 Strategies for Large Installations</td> 121 </tr> 122 </table> 123 </div> 124 </body> 125</html> 126 127