home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / protocol / appletal / 3915 next >
Encoding:
Internet Message Format  |  1992-11-15  |  5.1 KB

  1. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!batcomputer!munnari.oz.au!manuel.anu.edu.au!csc2.anu.edu.au!sorokin!gavin
  2. From: gavin@sorokin.anu.edu.au (Gavin K. Longmuir)
  3. Newsgroups: comp.protocols.appletalk
  4. Subject: CAP's lwsrv with Mac and PC spooling (a workin example)
  5. Date: 15 Nov 92 23:28:45 GMT
  6. Organization: Australian National University
  7. Lines: 193
  8. Message-ID: <gavin.721870125@sorokin>
  9. Reply-To: gavin@sorokin.anu.edu.au (Gavin Longmuir)
  10. NNTP-Posting-Host: 150.203.76.12
  11. Organisation: Research School of Social Sciences, Australian National University
  12.  
  13. Hi all, I've seen a few people posting to this newsgroup about certain
  14. configuation problems with lwsrv spooling. So here is a overview of a
  15. working version for Macintoshes and PC's (remember to compile with
  16. -DPASS_THUR if you want PC spooling). Best of luck. A copy of this document
  17. can be found on anonymous ftp site sorokin.anu.edu.au.
  18.  
  19. Gavin.
  20.  
  21.  
  22. ------
  23.  
  24. #!/bin/sh
  25. ### sample start servers file (copy to /usr/local/lib)
  26. ### start from '/etc/rc.local'
  27.  
  28. LOGd=/tmp/.aufs.log
  29. LOGf=/tmp/.gaufs.log
  30. LOGm=/tmp/.motd.log
  31. CAP=/usr/local/cap
  32. LIB=/usr/local/lib
  33.  
  34. MOTDFILES="/etc/cap.motd.1 /etc/cap.motd.2 /etc/motd"
  35.  
  36. AUFSLWLOG="-X /tmp/.cap.sockets"
  37. LWARGS="-a ${LIB}/adicts -f ${LIB}/LWFonts ${AUFSLWLOG}"
  38. LWARGSII="-a ${LIB}/adicts -f ${LIB}/LWPlusFonts ${AUFSLWLOG}"
  39. LWARGSIIfg="-a ${LIB}/adicts -f ${LIB}/LWIIfgFonts ${AUFSLWLOG}"
  40.  
  41. AUFSARGS="-l ${LOGd} -V /etc/atalkvols -U 60 -A /etc/cap.monitor \
  42.  -r /etc/cap.readme ${AUFSLWLOG}"
  43. AUFSGARGS="-l ${LOGf} -V /etc/atalkvols.g -U 10 -G common -i 15"
  44.  
  45. #
  46. # Start aarpd first for Native EtherTalk
  47. #
  48. nice --5 ${CAP}/aarpd "le0" "MYZONE"
  49.  
  50. #
  51. # allow atis to startup before other CAP programs
  52. #
  53. nice --5 ${CAP}/atis
  54.  
  55. #
  56. # Make this 15 seconds if using aarpd
  57. #
  58. sleep 15
  59.  
  60. nice --5 ${CAP}/asyncad
  61.  
  62. if [ -f ${LOGd} ] ; then
  63.     rm -f ${LOGd}
  64. fi
  65.  
  66. nice -5 ${CAP}/motd -l ${LOGm} -n "MYSERVER MOTD" ${MOTDFILES}
  67.  
  68. nice --5 ${CAP}/aufs -n "MYSERVER" ${AUFSARGS}
  69. nice -5 ${CAP}/aufs -n "MYSERVER Guest" ${AUFSGARGS}
  70.  
  71. # macuser must be run from a tty device
  72. if [ "`tty`" -ne "/dev/console" ] ; then
  73.     ${CAP}/macuser MANAGERACCT
  74. fi
  75.  
  76. ${CAP}/snitch -S -f "SUN SparcStation 1+ SunOS 4.1.2" -l lwsrv
  77. ${CAP}/timelord -n "MYSERVER Clock"
  78.  
  79. nice --5 ${CAP}/lwsrv -n "Graunt Mac Spooler" -p lw.graunt ${LWARGSII}
  80. nice -5 ${CAP}/printqueue -a "Graunt Mac Spooler" graunt /var/spool/lpd/grauntlp
  81. nice --5 ${CAP}/lwsrv -n "Graunt PC Spooler" -P -p grauntPC ${LWARGSII}
  82.  
  83. ------
  84.  
  85. # /etc/printcap entry for lwsrv connected laserwriter
  86. # Enable Printing on X's LaserWriter II NT "graunt"
  87. graunt|lw.graunt|Graunt LaserWriter II NT (Mac Spool) [Postscript]:\
  88.     :lp=/var/spool/lpd/graunt.log:\
  89.     :sd=/var/spool/lpd/grauntlp:\
  90.     :pw#85:pl#73:sf:\
  91.     :af=/var/adm/lpd_acct:\
  92.     :lf=/var/adm/lpd_errs:\
  93.     :if=/usr/local/lib/psif.graunt:
  94. grauntPC|Graunt LaserWriter II NT (PC Spool) [Postscript]:\
  95.     :lp=/var/spool/lpd/graunt.log:\
  96.     :sd=/var/spool/lpd/grauntlp:\
  97.     :pw#85:pl#73:sf:\
  98.     :af=/var/adm/lpd_acct:\
  99.     :lf=/var/adm/lpd_errs:\
  100.     :if=/usr/local/lib/psif.grauntPC:
  101.  
  102. -----
  103.  
  104. # /etc/cap.printers
  105. lw.graunt=Graunt:LaserWriter@SOMEZONE
  106.  
  107. -----
  108.  
  109. #! /bin/csh -fb
  110. # /usr/local/lib/psif.graunt
  111. #    macintosh version
  112. # sample line printer filter for the laserwriter
  113. #
  114.  
  115. umask 0
  116. set name="lwsrv spooler"
  117. set host="MYSERVER"
  118.  
  119. top:
  120.     if ($#argv > 0) then
  121.         switch ($argv[1])
  122.         case -n:
  123.             shift argv
  124.             if ($#argv > 0) then
  125.                 set name = $argv[1]
  126.                 shift argv
  127.             endif
  128.             goto top
  129.         case -h:
  130.             shift argv
  131.             if ($#argv > 0) then
  132.                 set host = $argv[1]
  133.                 shift argv
  134.             endif
  135.             goto top
  136.         default:
  137.  
  138.             shift argv
  139.             goto top
  140.         endsw
  141.     endif
  142.  
  143. echo "Printing Postscript" > /var/spool/lpd/grauntlp/status
  144. cat | /usr/local/cap/papif -p lw.graunt -n "$name" -h "$host"
  145.  
  146. exit(0)
  147.  
  148. -----
  149.  
  150. #! /bin/csh -fb
  151. # /usr/local/lib/psif.grauntPC
  152. #    IBM PC version
  153. # sample line printer filter for the laserwriter
  154. #
  155.  
  156. umask 0
  157. set name="lwsrv spooler"
  158. set host="MYSERVER"
  159.  
  160. top:
  161.     if ($#argv > 0) then
  162.         switch ($argv[1])
  163.         case -n:
  164.             shift argv
  165.             if ($#argv > 0) then
  166.                 set name = $argv[1]
  167.                 shift argv
  168.             endif
  169.             goto top
  170.         case -h:
  171.             shift argv
  172.             if ($#argv > 0) then
  173.                 set host = $argv[1]
  174.                 shift argv
  175.             endif
  176.             goto top
  177.         default:
  178.  
  179.             shift argv
  180.             goto top
  181.         endsw
  182.     endif
  183.  
  184. echo "Printing Postscript" > /var/spool/lpd/grauntlp/status
  185. tr -d '' | /usr/local/cap/papif -p lw.graunt -n "$name" -h "$host"
  186.  
  187. exit(0)
  188.  
  189. -----
  190.  
  191. > ls -lFg /usr/local/lib/adicts
  192. -rw-r--r--  1 root     staff       25884 Jun 15 13:57 LaserPrep3.1
  193. -rw-r--r--  1 root     staff       28647 Jun 15 13:57 LaserPrep3.3
  194. -rw-r--r--  1 root     staff       28365 Jun 15 13:57 LaserPrep4.0
  195. -rw-r--r--  1 root     staff       28605 Jun 15 13:57 LaserPrep5.1
  196. -rw-r--r--  1 root     staff       29892 Jun 15 13:57 LaserPrep5.2
  197. -rw-r--r--  1 root     staff       35085 Jun 15 13:57 LaserPrep7.0
  198.  
  199. -----
  200.  
  201. -- 
  202.        *                     Gavin Longmuir - General Dog's Body and Programmer
  203.     *    *               Demography Program, Research School of Social Sciences
  204.        *                    Australian National University, Canberra, AUSTRALIA
  205. Voice: +61 6 249 0530  FAX: +61 6 257 1893  InterNet: Gavin.Longmuir@anu.edu.au       *      UUCP: {uunet,ubc-vision,ukc,prlb2}!munnari!coombs.anu.edu.au!gavin
  206.