From 433786fce3418924f5f082ad4ea46448ec0edbf3 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 7 Jan 2003 17:48:12 +0000 Subject: (configure): return without doing anything when probe fails or needVideoRam in $auto mode (multi_head_choose): be completly automatic in $auto mode --- perl-install/Xconfig/card.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'perl-install/Xconfig/card.pm') diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm index 98f1957b8..968746f72 100644 --- a/perl-install/Xconfig/card.pm +++ b/perl-install/Xconfig/card.pm @@ -223,14 +223,16 @@ sub card_config__not_listed { } sub multi_head_choose { - my ($in, @cards) = @_; + my ($in, $auto, @cards) = @_; my @choices = multi_head_choices('', @cards); - my $tc = $in->ask_from_listf(N("Multi-head configuration"), - N("Your system support multiple head configuration. + my $tc = $choices[0]; + if (!$auto) { + $tc = $in->ask_from_listf(N("Multi-head configuration"), + N("Your system support multiple head configuration. What do you want to do?"), sub { $_[0]{text} }, \@choices) or return; - + } $tc->{code} or die internal_error(); return $tc->{code}(); } @@ -272,10 +274,11 @@ sub configure { my @cards = probe(); @cards or @cards = {}; - if (!$cards[0]{server} && !$cards[0]{Driver} || !$auto) { + if (!$cards[0]{server} && !$cards[0]{Driver}) { + return if $auto; card_config__not_listed($in, $cards[0], $options) or return; } - my $card = multi_head_choose($in, @cards) or return; + my $card = multi_head_choose($in, $auto, @cards) or return; $card->{Driver} = 'fbdev' if $options->{allowFB} && !$card->{server} && !$card->{Driver}; @@ -284,6 +287,7 @@ sub configure { $card->{prog} = install_server($card, $options, $do_pkgs); if ($card->{needVideoRam} && !$card->{VideoRam}) { + return if $auto; $card->{VideoRam} = (find { $_ <= $options->{VideoRam_probed} } reverse ikeys %VideoRams) || 4096; $in->ask_from('', N("Select the memory size of your graphics card"), [ { val => \$card->{VideoRam}, -- cgit v1.2.1