diff options
author | Till Kamppeter <tkamppeter@mandriva.com> | 2005-02-23 21:33:37 +0000 |
---|---|---|
committer | Till Kamppeter <tkamppeter@mandriva.com> | 2005-02-23 21:33:37 +0000 |
commit | 126aad60ee599b51ed23add3f8ddf89cf881edeb (patch) | |
tree | 754744a2ee8699bedc831a99151ee40b045b0696 /perl-install/printer | |
parent | 7a8311a16e02232b4a9ad58dbf93beecdb839e0e (diff) | |
download | drakx-126aad60ee599b51ed23add3f8ddf89cf881edeb.tar drakx-126aad60ee599b51ed23add3f8ddf89cf881edeb.tar.gz drakx-126aad60ee599b51ed23add3f8ddf89cf881edeb.tar.bz2 drakx-126aad60ee599b51ed23add3f8ddf89cf881edeb.tar.xz drakx-126aad60ee599b51ed23add3f8ddf89cf881edeb.zip |
- Made possible modifying the options on a non-Foomatic queue not set up
with printerdrake.
Diffstat (limited to 'perl-install/printer')
-rw-r--r-- | perl-install/printer/main.pm | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm index ec6082f21..9eb64ad99 100644 --- a/perl-install/printer/main.pm +++ b/perl-install/printer/main.pm @@ -313,7 +313,8 @@ sub read_configured_queues($) { } # Mark that we have a CUPS queue but do not know the name # the PPD file in /usr/share/cups/model - if (!$printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd}) { + if ((!$printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd}) && + (! -r $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd})) { $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd} = '1'; } $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{driver} = 'PPD'; @@ -666,7 +667,11 @@ sub read_ppd_options ($) { my $COMBODATA; open(my $F, ($::testing ? $::prefix : "chroot $::prefix/ ") . "foomatic-configure -P -q" . - " --ppd /usr/share/cups/model/$printer->{currentqueue}{ppd}" . + if_($printer->{currentqueue}{ppd} && + ($printer->{currentqueue}{ppd} ne '1'), + " --ppd " . ($printer->{currentqueue}{ppd} !~ m!^/! ? + "/usr/share/cups/model/" : "") . + $printer->{currentqueue}{ppd}) . ($printer->{OLD_QUEUE} ? " -s $printer->{SPOOLER} -n $printer->{OLD_QUEUE}" : "") . ($printer->{SPECIAL_OPTIONS} ? @@ -1911,16 +1916,18 @@ sub configure_queue($) { ("-p", $printer->{currentqueue}{printer}, "-d", $printer->{currentqueue}{driver}) : ($printer->{currentqueue}{ppd} ? - ("--ppd", - ($printer->{currentqueue}{ppd} !~ m!^/! ? - "/usr/share/cups/model/" : "") . - $printer->{currentqueue}{ppd}) : + ($printer->{currentqueue}{ppd} ne '1' ? + ("--ppd", + ($printer->{currentqueue}{ppd} !~ m!^/! ? + "/usr/share/cups/model/" : "") . + $printer->{currentqueue}{ppd}) : "") : ("-d", "raw"))), "-N", $printer->{currentqueue}{desc}, "-L", $printer->{currentqueue}{loc}, @{$printer->{currentqueue}{options}} ) or return 0;; - if ($printer->{currentqueue}{ppd}) { + if ($printer->{currentqueue}{ppd} && + ($printer->{currentqueue}{ppd} ne '1')) { # Add a comment line containing the path of the used PPD file to the # end of the PPD file if ($printer->{currentqueue}{ppd} ne '1') { |