我在许多多用户Linux应用程序服务器上运行CUPS打印。 系统是RHEL或CentOS版本4,5或6.启动EL5,CUPS打印服务器默认为一个错误策略,基本上在出现错误或中断(USB电缆断开,networking错误,卡纸等)时禁用打印机。 )。 这是ErrorPolicy文件中打印机节中的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>
我通常在configuration文件中手动将此字段更改为ErrorPolicy retry-job ,或者通过命令行创build打印机时:
lpadmin -p backupZ4 -v socket://backupZ4:9100 -o printer-error-policy=retry-job -E
当其他用户或供应商pipe理打印系统时,他们经常会忘记这一更改,导致打印机在卡纸或其他需要使用cupsenable进行更正的卡纸或卡纸时被严格禁用。
我想知道如何使CUPS中的默认ErrorPolicy与stop-printer retry-job 。
对于这种行为,有一个function请求已经被parsing到CUPS 1.3。 链接到CUPS错误跟踪器: http ://www.cups.org/str.php?L1871
我在CUPS在线文档中没有find任何支持这种行为的文档,但是我下载的CUPS 1.5.2源码tarball中的文档表明全局的“ErrorPolicy”声明可以从cupsd.confconfiguration文件中运行。
摘自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伪指令定义当后端无法将打印作业发送到打印机时使用的默认策略。
支持以下值:
* 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
(注意:文档版权归苹果公司所有,并且格式化为可读。)