From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawries@btinternet.com Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Setting up multiple printer quickly Date: Wed, 26 Feb 2003 14:51:00 +0000 (GMT) Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <5032125.1046271060548.JavaMail.root@127.0.0.1> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1046271139 26710 80.91.224.249 (26 Feb 2003 14:52:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 26 Feb 2003 14:52:19 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18o2u1-0006sx-00 for ; Wed, 26 Feb 2003 15:51:21 +0100 Original-Received: (qmail 16459 invoked by uid 5); 26 Feb 2003 14:51:25 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 16450 invoked by uid 49493); 26 Feb 2003 14:51:25 -0000 Original-Received: from lawries@btinternet.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-0.2/5.0):. Processed in 0.451846 secs); 26 Feb 2003 14:51:25 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 26 Feb 2003 14:51:24 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAX00BJ87XJTK@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 26 Feb 2003 09:51:23 -0500 (EST) Original-Received: from actinium.btinternet.com (actinium.btinternet.com [194.73.73.66]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTPS id <0HAX00D9Q7X1A8@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 26 Feb 2003 09:51:07 -0500 (EST) Original-Received: from germanium ([194.75.226.53]) by actinium.btinternet.com with esmtp (Exim 3.22 #8) id 18o2tg-0001Pu-00 for tru64-unix-managers@ornl.gov; Wed, 26 Feb 2003 14:51:00 +0000 Original-Received: from 194.129.126.228 by germanium ([194.75.226.53]); Wed, 26 Feb 2003 14:51:00 +0000 (GMT) Original-To: tru64-unix-managers@ornl.gov X-Mailer: talk21.com WAS v2 Xref: main.gmane.org gmane.os.tru64.managers:3452 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3452 Thank you to all respondents. The job is completed! Thank you to: Werner Rost, Phil Baldwin, Alan davis, Brian Mills and Mark Deiss. Mark's reply is listed below because the answer was the most comprehensive although all were along the same lines. ==== Mark Deiss ==== You do not mention if you are dealing with a mix of printers that may require different filters... while read LPNAME LPFILTER IPADDRESS do ( echo "${LPNAME}:\\" # need to escape the escape echo " :af=/usr/adm/lpd/${LPNAME}.acct:\\" echo " :lf=/usr/adm/lpd/${LPNAME}.err:\\" echo " :if=/usr/lbin/${LPFILTER}:\\" echo " :of=/usr/lbin/${LPFILTER}:\\" echo " :sd=/usr/spool/lpd/${LPNAME}:\\" echo " :lp=:\\" echo " :mx#0:\\" echo " :pw#0:\\" .... .... echo " :pl#66:" # last descriptor for printer entry does not include a "\" # you get the idea, put in whatever printcap values you need.... ) >> /tmp/printcap.build if [ ! -d /usr/spool/lpd/${LPNAME} ]; then mkdir /usr/spool/lpd/${LPNAME} chown daemon.daemon /usr/spool/lpd/${LPNAME} chmod 755 /usr/spool/lpd/${LPNAME} fi echo "IPADDRESS $LPNAME" >> /tmp/hosts.build done <<-! printer1 filter1 ipaddress1 printer2 filter2 ipaddress2 ... ... ! Check the content of /tmp/printcap.build and /tmp/hosts.build. If they look correct, append printcap.build to /etc/printcap. append hosts.build to /etc/hosts cat /tmp/printcap.build >> /etc/printcap cat /tmp/hosts.build >> /etc/hosts Bounce the lpd daemon /sbin/init.d/lpd stop /sbin/init.d/lpd start run lpstat to see what is status on everything. Things that may require some tweaking are how you want to set up networked printers - some printers may be using port 515, some 9100... whatever. If there is a lot of variation, you may want to pass the service port flag in the read list (as defined in your /etc/services file) and use something like lp=@${LPNAME}/${LPSERVICE_PORT}. If you are using a single filter for all your printers, then obviously do not need an entry in your read list. You mention a new server - that may imply you have an old server that has all 200 spool entries, in that case you may be able to use the old system's printcap file and only need to build the spool directory. Some sites also like to nest the accounting and error log files in whatever path so you may need logic to build any directory structures for that. Lawrie