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

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