Hello,
I am writing a chooser script which needs send a query sting to each of
the subservers in the print pool to determine printer availability.
The setup will be about 16 identical printers serial printers
hanging off of Mylan print servers.
Here is the testing printcap I am working with....
lp:force_localhost
lp:server
:sd=/files/gniel/spool/%P
:sv=lp2,lp3
:chooser=/files/gniel/chooser.script
:lf=log
lp2:force_localhost
lp2:server
:ss=lp
:sd=/files/gniel/spool/%P
:lp=localhost%5760
lp3:force_localhost
lp3:server
:ss=lp
:sd=/files/gniel/spool/%P
:lp=localhost%5761
I have netcat running on the two local ports to catch the print jobs.
I have read over the LPRng How-to and my chooser.script is getting the
standard environment variables for lp2 and lp3. ie.
lp2=change=0x0
done_time=0x2
held=0x0
move=0x0
printable=0x0
printer=lp2
queue_control_file=/files/gniel/spool/lp2/control.lp2
spooldir=/files/gniel/spool/lp2
lp3=change=0x0
done_time=0x1
held=0x0
move=0x0
printable=0x0
printer=lp3
queue_control_file=/files/gniel/spool/lp3/control.lp3
spooldir=/files/gniel/spool/lp3
The problem I am running into is that I need the lp entry from each of
the subservers in the chooser.script environment in order to send query
strings to the printers.
In order to get this information I have made a small patch to LPRng
3.7.4 so the lp entry for each subserver now appears in the subserver
environmental variable. ie.
lp2=change=0x0
done_time=0x2
held=0x0
lp=localhost%5760
move=0x0
printable=0x0
printer=lp2
queue_control_file=/files/gniel/spool/lp2/control.lp2
spooldir=/files/gniel/spool/lp2
lp3=change=0x0
done_time=0x1
held=0x0
lp=localhost%5761
move=0x0
printable=0x0
printer=lp3
queue_control_file=/files/gniel/spool/lp3/control.lp3
spooldir=/files/gniel/spool/lp3
It is a small diff so here it is
--- ./src/lpd_jobs.c Thu Dec 28 08:06:05 2000
+++ /home/gniel/lpd_jobs.c.modified Fri Feb 9 16:14:03 2001
@@ -230,6 +230,8 @@
Set_flag_value(subserver_info,MOVE,move);
Set_flag_value(subserver_info,DONE_TIME,done_time);
+ Set_str_value(subserver_info,LP,Lp_device_DYN);
+
DEBUG1("Get_subserver_pc: printable %d, held %d, move %d,
fowarding '%s'",printable, held, move,
Find_str_value(subserver_info,FORWARDING,Value_sep) );
So I am looking for input on if this change would cause any problems
down the road. I thought it might effect the control file format.
Thanks
Garth Nielsen
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------