From 7f9eea64cc14d0bf7f41da524972bccb59189f94 Mon Sep 17 00:00:00 2001 From: Till Kamppeter Date: Mon, 15 Aug 2005 20:20:22 +0000 Subject: - Added per-printer configurable handling of CUPS backend errors. This way CUPS does not disable print queues automatically any more (for example if printer not turned on). --- perl-install/printer/main.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'perl-install/printer/main.pm') diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index 78085b39e..951e6734a 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -803,8 +803,9 @@ sub get_jap_textmode() { # Handling of /etc/cups/cupsd.conf sub read_cupsd_conf() { - # If /etc/cups/cupsd.conf a default cupsd.conf will be put out to avoid - # writing of a broken cupsd.conf file when we write it back later. + # If /etc/cups/cupsd.conf does not exist a default cupsd.conf will be + # put out to avoid writing of a broken cupsd.conf file when we write + # it back later. my @cupsd_conf = cat_("$::prefix/etc/cups/cupsd.conf"); if (!@cupsd_conf) { @cupsd_conf = map { /\n$/s or "$_\n" } split('\n', @@ -1977,6 +1978,13 @@ sub configure_queue($) { ("-d", "raw"))), "-N", $printer->{currentqueue}{desc}, "-L", $printer->{currentqueue}{loc}, + if_($printer->{SPOOLER} eq "cups", + "--backend-dont-disable=" . + $printer->{currentqueue}{dd}, + "--backend-attempts=" . + $printer->{currentqueue}{att}, + "--backend-delay=" . + $printer->{currentqueue}{delay}), @{$printer->{currentqueue}{options}} ) or return 0; if ($printer->{currentqueue}{ppd} && -- cgit v1.2.1