summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-07 17:48:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-07 17:48:12 +0000
commit433786fce3418924f5f082ad4ea46448ec0edbf3 (patch)
treea55a3a365ec82b3e08591f6f81aa7114178d6766 /perl-install
parent599e3961b0f45aa59fe713b5db3015a100a5d62e (diff)
downloaddrakx-backup-do-not-use-433786fce3418924f5f082ad4ea46448ec0edbf3.tar
drakx-backup-do-not-use-433786fce3418924f5f082ad4ea46448ec0edbf3.tar.gz
drakx-backup-do-not-use-433786fce3418924f5f082ad4ea46448ec0edbf3.tar.bz2
drakx-backup-do-not-use-433786fce3418924f5f082ad4ea46448ec0edbf3.tar.xz
drakx-backup-do-not-use-433786fce3418924f5f082ad4ea46448ec0edbf3.zip
(configure): return without doing anything when probe fails or needVideoRam in $auto mode
(multi_head_choose): be completly automatic in $auto mode
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm16
1 files changed, 10 insertions, 6 deletions
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},