[cups.general] Re: "Printer disabled" - how to prevent it?

Norbert Kamenicky noro at xmedia.sk
Mon Aug 8 10:23:56 PDT 2005


Michael Sweet wrote:
> Mangoo wrote:
> 
>> ...
>> Is there a setting in CUPS configuration that would prevent this issue?
> 
> 
> No.
> 
> The error message that the printer was not responding, not connected,
> or not turned on when you printed the job.  CUPS treats that as a
> fatal error and stops the printer until you can correct the situation.
> 
> CUPS 1.2 will add notification support (it will tell you when a
> printer goes down) and error policies so that you can tell CUPS to
> retry errors like this...
> 

I hear about CUPS 1.2 advantages for ages now, so I have such a feeling
it's an utopia for next years 8-).

However it's really easy to solve your problem ...
just put this line in root's crontab:

*/5 * * * * lpstat -p|grep disabled|while read a b c;\
do /usr/bin/enable $b;done >/dev/null 2>&1

Cron will check which printer is disabled and enables it
every 5 minutes. If u like notifications only, use this line:

*/5 * * * * lpstat -p|grep disabled|while read a b c;\
do mail -s "printer $b is disabled" you at your.domain </dev/null;\
done >/dev/null 2>&1


HTH noro





More information about the cups mailing list