summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-09-01 12:36:09 +0000
committerFrancois Pons <fpons@mandriva.com>2000-09-01 12:36:09 +0000
commit0c928ac011478e29c10950a8f21e4bd7140e2a63 (patch)
treee6ef28ecbe9d82ee895543842ff97fb69f1f15ae /perl-install/install_steps.pm
parented0e070f2f50f0c2283651e1de0c9bb6713f3c29 (diff)
downloaddrakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.gz
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.bz2
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.tar.xz
drakx-0c928ac011478e29c10950a8f21e4bd7140e2a63.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index e21957845..2d1cd8aa1 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -521,16 +521,23 @@ sub configureServices {
#------------------------------------------------------------------------------
sub configurePrinter {
my($o) = @_;
- if ($o->{printer}{configured}) {
- require pkgs;
- pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'rhs-printfilters'));
- $o->installPackages($o->{packages});
+ my ($use_cups, $use_lpr) = (0, 0);
+ 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(($use_cups ? ('cups-drivers') : ()), ($use_lpr ? ('rhs-printfilters') : ()));
require printer;
eval { add2hash($o->{printer}, printer::getinfo($o->{prefix})) }; #- get existing configuration.
- printer::read_printer_db(); #- load printer db, else configuration will fails.
+ $use_cups and printer::poll_ppd_base();
+ $use_lpr and printer::read_printer_db();
foreach (keys %{$o->{printer}{configured} || {}}) {
- log::l("configuring printer queue $_->{queue}");
+ 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.