From 4518333f00c36f19b3425202e07e5db5d32a10ce Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Thu, 31 Aug 2000 14:58:10 +0000 Subject: *** empty log message *** --- perl-install/install_steps_interactive.pm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'perl-install/install_steps_interactive.pm') diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 1d4eab9e3..51a5cf094 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -642,7 +642,7 @@ sub configureServices { sub configurePrinter { my ($o, $clicked) = @_; - return if $::corporate; + $::corporate and return; require printer; require printerdrake; @@ -651,11 +651,20 @@ sub configurePrinter { printerdrake::auto_detect($o) or return; } - #- 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'); - + #- take default configuration, this include choosing the right system + #- currently used by the system. eval { add2hash($o->{printer} ||= {}, printer::getinfo($o->{prefix})) }; + + #- figure out what printing system to use, currently are suported cups and lpr, + #- in case this has not be detected above. + $::beginner and $o->{printer}{mode} ||= 'cups'; #'lpr'; + if (!$o->{printer}{mode}) { + $o->{printer}{mode} = $o->ask_from_list_([''], _("What printing system do you want to use?"), + [ 'cups', 'lpr', __("Cancel") ], + ); + $o->{printer}{mode} eq 'Cancel' and $o->{printer}{mode} = undef, return; + } + $o->{printer}{PAPERSIZE} = $o->{lang} eq 'en' ? 'letter' : 'a4'; printerdrake::main($o->{printer}, $o, sub { $o->pkg_install($_[0]) }, sub { install_interactive::upNetwork($o, 'pppAvoided') }); } -- cgit v1.2.1