summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-08-22 09:55:40 +0000
committerFrancois Pons <fpons@mandriva.com>2001-08-22 09:55:40 +0000
commit88a385e8f8f2579b5c91284b5936adb67aa4fece (patch)
tree234e7b78ebf2b617aaa1fe5a5ef33fa333410d56 /perl-install/install_steps.pm
parent7ddf9f2f030df8ae81382764e687a7a60658d6c8 (diff)
downloaddrakx-88a385e8f8f2579b5c91284b5936adb67aa4fece.tar
drakx-88a385e8f8f2579b5c91284b5936adb67aa4fece.tar.gz
drakx-88a385e8f8f2579b5c91284b5936adb67aa4fece.tar.bz2
drakx-88a385e8f8f2579b5c91284b5936adb67aa4fece.tar.xz
drakx-88a385e8f8f2579b5c91284b5936adb67aa4fece.zip
updated configurePrinter to use foomatic printer configuration.
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm35
1 files changed, 14 insertions, 21 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index eee7812f4..3d22db550 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -601,28 +601,21 @@ sub configureServices {
#------------------------------------------------------------------------------
sub configurePrinter {
my($o) = @_;
- my ($use_cups, $use_lpr) = (0, 0);
+ $o->do_pkgs->install('foomatic', 'printer-utils','printer-testpages',
+ if_($o->do_pkgs->is_installed('gimp'), 'gimpprint'));
+
+ require printer;
+ eval { add2hash($o->{printer} ||= {}, printer::getinfo($o->{prefix})) }; #- get existing configuration.
+
+ require printerdrake;
+ printerdrake::install_spooler($o->{printer}, $o); #- not interactive...
+
foreach (values %{$o->{printer}{configured} || {}}) {
- for ($_->{mode}) {
- /CUPS/ and $use_cups++;
- /lpr/ and $use_lpr++;
- }
- }
- #- if at least one queue is configured, configure it.
- if ($use_cups || $use_lpr) {
- $o->pkg_install(if_($use_cups, 'cups-drivers'), if_($use_lpr, 'rhs-printfilters'));
-
- require printer;
- eval { add2hash($o->{printer}, printer::getinfo($o->{prefix})) }; #- get existing configuration.
- $use_cups and printer::poll_ppd_base();
- $use_lpr and printer::read_printer_db();
- foreach (values %{$o->{printer}{configured} || {}}) {
- log::l("configuring printer queue $_->{QUEUE} for $_->{mode}");
- printer::copy_printer_params($_, $o->{printer});
- #- setup all configured queues, which is not the case interactively where
- #- only the working queue is setup on configuration.
- printer::configure_queue($o->{printer});
- }
+ log::l("configuring printer queue $_->{QUEUE} for $_->{mode}");
+ printer::copy_printer_params($_, $o->{printer});
+ #- setup all configured queues, which is not the case interactively where
+ #- only the working queue is setup on configuration.
+ printer::configure_queue($o->{printer});
}
}