summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps_interactive.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-12 12:03:57 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-12 12:03:57 +0000
commitd9b7bf292746fb16468f7630e60e61dfa62c0def (patch)
treed5152621194f76a7a2aa26b93a1d14079292aa86 /perl-install/install_steps_interactive.pm
parent5387d3020d316ea242b21230da5afd3065abb9df (diff)
downloaddrakx-d9b7bf292746fb16468f7630e60e61dfa62c0def.tar
drakx-d9b7bf292746fb16468f7630e60e61dfa62c0def.tar.gz
drakx-d9b7bf292746fb16468f7630e60e61dfa62c0def.tar.bz2
drakx-d9b7bf292746fb16468f7630e60e61dfa62c0def.tar.xz
drakx-d9b7bf292746fb16468f7630e60e61dfa62c0def.zip
fixed ask printer configuration.
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r--perl-install/install_steps_interactive.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 17901109d..6b13016ff 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -840,18 +840,14 @@ sub configurePrinter {
require printer;
require printerdrake;
- if (!$::expert && !$clicked) {
- printerdrake::auto_detect($o) or return;
- }
-
- my $printer = $o->{printer} ||= {};
-
- #- bring interface up for installing ethernet packages but avoid ppp by default,
- #- else the guy know what he is doing...
- #install_interactive::upNetwork($o, 'pppAvoided');
+ #- try to determine if a question should be asked to the user or
+ #- if he is autorized to configure multiple queues.
+ my $ask_multiple_printer = !$::expert && !$clicked ? scalar(printerdrake::auto_detect($o)) : 2;
+ $ask_multiple_printer-- or return;
#- take default configuration, this include choosing the right system
#- currently used by the system.
+ my $printer = $o->{printer} ||= {};
eval { add2hash($printer, printer::getinfo($o->{prefix})) };
#- figure out what printing system to use, currently are suported cups and lpr,
@@ -869,7 +865,8 @@ sub configurePrinter {
}
$printer->{PAPERSIZE} = $o->{lang} eq 'en' ? 'letter' : 'a4';
- printerdrake::main($printer, $o, sub { $o->pkg_install(@_) }, sub { install_interactive::upNetwork($o, 'pppAvoided') });
+ printerdrake::main($printer, $o, $ask_multiple_printer,
+ sub { $o->pkg_install(@_) }, sub { install_interactive::upNetwork($o, 'pppAvoided') });
$o->pkg_install_if_requires_satisfied('Mesa-common', 'xpp', 'libqtcups2', 'qtcups', 'kups') if !is_empty_hash_ref($printer->{configured}) || pkgs::packageFlagInstalled(pkgs::packageByName($o->{packages}, 'cups'));
}