eravin@panix.uucp (Ed Ravin) (03/26/91)
I would like print jobs on my RS-6000 running AIX 3003 to be routed to an arbitrary script that could call either UUCP, Kermit, or some other program to ship my files to a printer server. Is there anyway to do this and still use system printer support (smit, printer queues, piobe, etc.)? ---------------------------------------------------------------------------- Ed Ravin | cmcl2!panix!eravin | pardon our appearance -- .signature under construction philabs!trintex!elr | -- ---------------------------------------------------------------------------- Ed Ravin | cmcl2!panix!eravin | pardon our appearance -- .signature under construction philabs!trintex!elr |
freese@dalvm41b.vnet.ibm.com ("Bradley T. Freese") (05/15/91)
eravin@panix.uucp (Ed Ravin) writes: > I would like print jobs on my RS-6000 running AIX 3003 to be routed to an > arbitrary script that could call either UUCP, Kermit, or some other program > to ship my files to a printer server. Is there anyway to do this and still > use system printer support (smit, printer queues, piobe, etc.)? Yes, and you can select the degree of support. To use the queuing system (and therefore have queuing support and smit support), you need to put appropriate queue and device stanzas in the file /etc/qconfig. You can either use smit to add a "queue" and a "queue device" or you can edit the file directly. The simplest stanzas would be something similar to: lp51: device = lp5 lp5: backend = /bin/ksh /usr/bin/pb51 (Use at your own risk.) In this example, the backend is *not* piobe, but some user-written command/script that processes the file. If you want to use piobe, you can call it from within your command/script. Some notes on the semantics of the "backend" keyword -- the name of the spool file for the current job is passed to the backend as the last parameter. The queuing system does *not* pipe the spool file into standard input for the command. Furthermore, when the command exits, the queuing system will erase the file. Make sure you are done with it!!!
eravin@panix.uucp (Ed Ravin) (05/16/91)
In article <9105141948.AA13256@ucbvax.Berkeley.EDU> freese@dalvm41b.vnet.ibm.com ("Bradley T. Freese") writes: >eravin@panix.uucp (Ed Ravin) writes: >> I would like print jobs on my RS-6000 running AIX 3003 to be routed to an >> arbitrary script that could call either UUCP, Kermit, or some other program >> to ship my files to a printer server. Is there anyway to do this and still >> use system printer support (smit, printer queues, piobe, etc.)? > >Yes, and you can select the degree of support. To use the queuing system >(and therefore have queuing support and smit support), you need to put >appropriate queue and device stanzas in the file /etc/qconfig. [ instructions on editing /etc/qconfig deleted ] That's what I ended up doing. I was more or less able to set the queues up with SMIT, and pointed the backend to my shell script which Kermit'd my files to the print server (you folks in Net-Land with real LAN's don't know how lucky you are ;-). >Some notes on the semantics of the "backend" keyword -- the name of >the spool file for the current job is passed to the backend as the >last parameter. But that was the only parameter I could find given by the spooler to the backend. Nothing about the queue device or any of the lpr options. Since I had three different variations on my backend, I ended up using one shell script with two extra names linked to it and using `basename $0` to figure out which queue device had been invoked. I also wish the spooler could be told not to run all three queue devices at once -- they all use the same tty port for output. The spooler will run jobs in an individual virtual queue in sequence, but it will let all the virtual queues attached to the same real queue run simultaneously. -- Ed Ravin | I'm sorry, sir, but POSTAL REGULATIONS don't allow cmcl2!panix!eravin | PLASTIC tape over PAPER tape and NYLON cord on an philabs!trintex!elr | 86 inch girth to LITHUANIA... +1 914 993 4737 |