我在许多多用户
Linux应用程序服务器上运行CUPS打印.系统是RHEL或CentOS版本4,5或6.启动EL5时,CUPS打印服务器默认为错误策略,在出现错误或中断(USB电缆断开,网络错误,卡纸等)时基本上禁用打印机. ).这是/etc/cups/printers.conf文件中打印机节中的ErrorPolicy指令.
- <Printer backupZ4>
- Info backupZ4
- DeviceURI socket://backupZ4:9100
- State Idle
- Accepting Yes
- Shared Yes
- JobSheets none none
- QuotaPeriod 0
- PageLimit 0
- KLimit 0
- OpPolicy default
- ErrorPolicy stop-printer
- </Printer>
我通常在配置文件中手动将此字段更改为ErrorPolicy重试作业,或者当我通过命令行创建打印机时:
- lpadmin -p backupZ4 -v socket://backupZ4:9100 -o printer-error-policy=retry-job -E
当其他用户或供应商管理打印系统时,他们经常忘记这种变化,这导致打印机在发生卡纸或其他需要使用cupsenable修正的光点后被严格禁用.
我想知道如何使重试作业成为CUPS中的默认ErrorPolicy而不是停止打印机.
对于这种行为,有一个功能请求被解析为CUPS 1.3.链接到CUPS错误跟踪器:
http://www.cups.org/str.php?L1871
我在CUPS在线文档中找不到支持此行为的文档,但我下载的CUPS 1.5.2源代码tarball中的文档表明全局“ErrorPolicy”声明可以在cupsd.conf配置文件中起作用.
摘自Ubuntu CUPS 1.5.2中的cupsd.conf文档:
CUPS 1.3 / Mac OS X 10.5
ErrorPolicy
例子
- * ErrorPolicy abort-job
- * ErrorPolicy retry-job
- * ErrorPolicy stop-printer
描述
ErrorPolicy指令定义a时使用的默认策略
后端无法将打印作业发送到打印机.
支持以下值:
- * abort-job - Abort the job and proceed with the next job in the queue
- * retry-job - Retry the job after waiting for N seconds; the cupsd.conf
- JobRetryInterval directive controls the value of N
- * retry-this-job - Retry the current job immediately and indefinitely.
- * stop-printer - Stop the printer and keep the job for future printing;
- this is the default value
(注意:Apple Inc.的文档版权和重新格式化是可读的.)