[ -r $mapping ] || exit 2
set -- `grep -e "^$printer:" $mapping` || exit 3
shift
network=$*
and changed
) | $network -s -ob $lpflags
to be:
) | netcat -h Printer2 -p 9100
) | netcat -h Printer3 -p 9101
) | netcat -h Printer4 -p 9102
The problem I am seeing is rather strange. The script is the same for
each one with the exception the the Port number. I also changed the file
in /usr/spool/lp/admins/lp/interfaces/Printer2 to have these changes. I
did change the port number on each (9100, 9101, and 9102).
$ diff Printer2 hpnp.model | more
43d42
< PORTNO="9100"
60c59
< echo "$1\t$REALMODEL | $HPNPF -x $PERIPH -p $PORTNO" >> $LPLOG
---
> echo "$1\t$REALMODEL | $HPNPF -x $PERIPH" >> $LPLOG
What I am seeing from Realworld only is as follows...
1. It spawn 2 or more print jobs for the document if it is more than 3 or
4 pages. I have seen any where from 2-15 copies printed all correctly.
2. If they print 1 copy, each of these printers will print differently
the same report. For example Printer2 will print all pages correctly but
will be just a few lines short on the last page and not be at the end of
the page. Printer3 the first 2 pages will be off but all other pages
will be exactly on through the whole report. Printer4 will print all pages
exactly right but the last will be a few blank lines over the end of the
last page. I can switch the printers and the problem stays with the port
and report. I can change to a different report and the 3 printers with
have the same problem just on a different port. Other reports may work
for 6-20 and then suddenly start doing one of the errors. Netstat does
not show any errors. I thought maybe I was losing packets but I have
verified that I am not really getting anything out of the normal. I have
tried making a seperate network with just the OSR 5 box and the printer
server on a hub as well as a cross-over cable with the same results as
having it on the main 16 port switch.
3. Realworld will not let the print job go to the printer till you exit
with a yes or no to the question. Have all the checks printed correctly?
I do not know if they have printed correctly or not?
4. The printers may wait the time-out period or may start printing
imediately on the different printers from Realworld. This is with the
same report but to any one of the network printers.
Realworld does not have any suggestions on what to do.
Thanks for any suggestions.
--
Boyd Gerber <ger...@zenez.com>
ZENEZ 3748 Valley Forge Road, Magna Utah 84044
Office 801-250-0795 FAX 801-250-7975
Hi
Just an idea, put a line above the netcat line to output to a log file
ie: echo " --------Start of printer output---------" >> /tmp/lplog
and change the | netcat to |tee -a /tmp/lplog | netcat
This will tell you how many times the interface script was called, and
also
log what is sent to netcat
--
================================================
Robert Brady
rob...@crow.cfs.net.au
================================================
> 3. Realworld will not let the print job go to the printer till you exit
> with a yes or no to the question. Have all the checks printed correctly?
> I do not know if they have printed correctly or not?
For these things, Realworl wants to print to a device, not a
spooler. Use the named pipe method described at
http://pcunix.com/SCOFAQ/scotec7.html#netdevice
--
Tony Lawrence (to...@aplawrence.com)
SCO/Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com
Thanks, I should have mentioned I had tried that first. That method adds
a problem 5 of random missing checks. When I used the named pipe every
printing will be missing some checks. Never the same ones. If I print 30
checks 1-5 will be missing. I do not get parts being printed with the
rest missing, but the entire check missing. Where with the spooler I can
not get it to miss every time just once in a great while..
Thanks,
I use Kevin Smith's script and it works flawlessly. I've one location
that puts thousands of sequential print jobs through it every day.
> #!/bin/sh
> DEV=/dev/pseudo-printer-name-which-you-created-with-mknod-p
>
> while :
> do
> # exec will hang till someone opens DEV for writing
> exec <$DEV
> lp -dprinter-spool-name
> -or-
> hpnpf ...whateverittakestoprintfromstdin...
> done
> --
> Do two rights make | Kevin Smith, ShadeTree Software, Philadelphia, PA, USA
> a libertarian | 001-215-487-3811 shady.com,kevin bbs.cpcn.com,sysop
> | dvtug.org,kevins--Deleware Valley Transit Users Group
--tom
==========================================================================
Tom Parsons t...@tegan.com
==========================================================================
That is so strange. I use that in literally dozens and
dozens of RW/CP etc. jobs and other places where the
software is too stupid to spool. Sure you didn't do
something like
while true
do
cat /dev/myprinter
done | lp
instead of
while true
do
cat /dev/myprinter | lp
done
I've absentmindedly done that a few times with
understandably bad results..
I have the exact same thing running on 8.0X with out problems. I think
they changed something. I am trying something now that appears to be
working most of the time.
This one drops whole checks not parts and misses some headers
while true
do
cat /dev/printer2 | /usr/local/bin/netcat -h Printer2 -p 9100
done
and so does this one.
while true
do
cat /dev/printer2 | /usr/bin/lp -dPrinter2
done
but this one for the first 3 hours seems to work.
#!/bin/sh
DEV=/dev/printer2
while :
do
exec <$DEV
/usr/bin/lp -dPrinter2
done