Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

error report redirection

1 view
Skip to first unread message

Ronald J Marchand

unread,
Jul 17, 2003, 12:02:42 PM7/17/03
to
In my printer interface script I have the following:
until /usr/bin/netgearcheck $PRTHOST $PRTPORT
do
sleep 10
done

If network traffic is really heavy, it occasionally encounters an error.
The error is mailed to the user who submitted the print job.

What can I do to this line to cause the lp system to ignore this problem and
not send the user mail OR redirect the mail to another user.

Any help appreciated.

TIA
Ron

to...@aplawrence.com

unread,
Jul 17, 2003, 1:10:16 PM7/17/03
to


If your script always does an "exit 0" then the rest of lp is going
to assume it was successful..

What's actually happening here? Is it sleeping so long that lp
assumes the script fails? Perhaps you can be more creative and
only check for a short period of time?

But then again, why wouldn't you want to notify the user of an error?

--
to...@aplawrence.com Unix/Linux/Mac OS X resources: http://aplawrence.com
Get paid for writing about tech: http://aplawrence.com/publish.html


Jean-Pierre Radley

unread,
Jul 17, 2003, 2:00:18 PM7/17/03
to
Tony Lawrence typed (on Thu, Jul 17, 2003 at 05:10:16PM +0000):

| Ronald J Marchand <roj...@covad.net> wrote:
| >In my printer interface script I have the following:
| >until /usr/bin/netgearcheck $PRTHOST $PRTPORT
| >do
| > sleep 10
| >done
|
| >If network traffic is really heavy, it occasionally encounters an error.
| >The error is mailed to the user who submitted the print job.
|
| >What can I do to this line to cause the lp system to ignore this problem and
| >not send the user mail OR redirect the mail to another user.
|
| If your script always does an "exit 0" then the rest of lp is going
| to assume it was successful..
|
| What's actually happening here? Is it sleeping so long that lp
| assumes the script fails? Perhaps you can be more creative and
| only check for a short period of time?
|
| But then again, why wouldn't you want to notify the user of an error?

Starting in OSR 5.0.6, inserting CANCEL_MAIL=NO in /etc/default/lpd
will stop messages about failed printing jobs from being mailed to the
invoking user.


--
JP

to...@aplawrence.com

unread,
Jul 17, 2003, 2:42:54 PM7/17/03
to
Ronald J Marchand <roj...@covad.net> wrote:

>The routine checks the status of the print server every 10 seconds. If it
>is ready, then the job prints else it continues to loop.
>
>Why?? you might ask. Because Netgear print servers are buggy.

Umm, not in my experience. Are you using netcat?

I have dozens and dozens of netgears in the field, all using netcat. The
only time I have problems with these is with lpd or using their
Windows software to go directly. But with netcat
( http://aplawrence.com/SCOFAQ/scotec7.html#getnetcat for those
who don't know), no problems at all.

Well, one Linux box the netgear keeps losing its ip address, but the
customer won't let me find out why, so I can't say that's really
a netgear problem.

to...@aplawrence.com

unread,
Jul 17, 2003, 2:44:20 PM7/17/03
to
Jean-Pierre Radley <j...@jpr.com> wrote:

>Starting in OSR 5.0.6, inserting CANCEL_MAIL=NO in /etc/default/lpd
>will stop messages about failed printing jobs from being mailed to the
>invoking user.

I knew about that, but does it also work for failed jobs as well
as cancelled?

Ronald J Marchand

unread,
Jul 17, 2003, 2:27:08 PM7/17/03
to
"Jean-Pierre Radley" <j...@jpr.com> wrote in message
news:20030717180...@jpradley.jpr.com...

Unfortunately this is pre 5.0.6. But the print job is not failing. The
perl script (in netgearcheck) is encountering difficulty and that is what is
being mailed.

Ron

Ronald J Marchand

unread,
Jul 17, 2003, 2:54:24 PM7/17/03
to
<to...@aplawrence.com> wrote in message news:bf6qne$vl9$1...@pcls4.std.com...

> Ronald J Marchand <roj...@covad.net> wrote:
>
> >The routine checks the status of the print server every 10 seconds. If
it
> >is ready, then the job prints else it continues to loop.
> >
> >Why?? you might ask. Because Netgear print servers are buggy.
>
> Umm, not in my experience. Are you using netcat?

Yes I am. And it works as expected. But Netgear print servers with a
firmware later than 6017 have problems. We had a prior thread here on this
subject. If the printer is not on line, the job goes into never-never land.
If I only had one or two I would sledge hammer them into the trash can.

>
> I have dozens and dozens of netgears in the field, all using netcat. The
> only time I have problems with these is with lpd or using their
> Windows software to go directly. But with netcat
> ( http://aplawrence.com/SCOFAQ/scotec7.html#getnetcat for those
> who don't know), no problems at all.
>
> Well, one Linux box the netgear keeps losing its ip address, but the
> customer won't let me find out why, so I can't say that's really
> a netgear problem.

Check the firmware revision ....

Ron

Bill Vermillion

unread,
Jul 17, 2003, 11:57:25 PM7/17/03
to
In article <bf6qne$vl9$1...@pcls4.std.com>, <to...@aplawrence.com> wrote:
>Ronald J Marchand <roj...@covad.net> wrote:
>
>>The routine checks the status of the print server every 10 seconds. If it
>>is ready, then the job prints else it continues to loop.
>>
>>Why?? you might ask. Because Netgear print servers are buggy.
>
>Umm, not in my experience. Are you using netcat?

>I have dozens and dozens of netgears in the field, all using netcat. The
>only time I have problems with these is with lpd or using their
>Windows software to go directly. But with netcat
>( http://aplawrence.com/SCOFAQ/scotec7.html#getnetcat for those
>who don't know), no problems at all.

The old Netgears with the 6017 firmware worked fine. Then they
moved to 6026 ?? [from memory] and they stopped being 'fine.

--
Bill Vermillion - bv @ wjv . com

0 new messages