summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-11-16 12:29:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-11-16 12:29:42 +0000
commit630a965d6ffe5428ef444881f00bc25a2935632e (patch)
tree8456a9cdd31d597af9b13b03eec42fc6c524323d
parent1216468441a344c005290f121087a1c312f500cb (diff)
downloaddrakx-630a965d6ffe5428ef444881f00bc25a2935632e.tar
drakx-630a965d6ffe5428ef444881f00bc25a2935632e.tar.gz
drakx-630a965d6ffe5428ef444881f00bc25a2935632e.tar.bz2
drakx-630a965d6ffe5428ef444881f00bc25a2935632e.tar.xz
drakx-630a965d6ffe5428ef444881f00bc25a2935632e.zip
- a little cleanup
- in case there is both scsi and ide hard drives, go to expert questions directly (it would need a semi_auto asking on which drive the bios boots...)
-rw-r--r--perl-install/any.pm17
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 0a4dab084..45b34f600 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -88,11 +88,18 @@ sub setupBootloader {
my $hds = $all_hds->{hds};
$more++ if $b->{bootUnsafe};
- $more = 2 if arch() =~ /ppc/; #- no auto for PPC yet
+ my $automatic = !$::expert && $more < 1;
+ my $semi_auto = !$::expert && arch() !~ /ia64/;
+ my $ask_per_entries = $::expert || $more > 1;
+ $automatic = 0 if arch() =~ /ppc/; #- no auto for PPC yet
+ $automatic = $semi_auto = 0
+ #- full expert questions when there is 2 kind of disks
+ #- it would need a semi_auto asking on which drive the bios boots...
+ if (grep { $_->{device} =~ /^sd/ } @$hds) && (grep { $_->{device} =~ /^hd/ } @$hds);
- if (!$::expert && $more < 1) {
+ if ($automatic) {
#- automatic
- } elsif (!$::expert && arch() !~ /ia64/) {
+ } elsif ($semi_auto) {
my @l = (__("First sector of drive (MBR)"), __("First sector of boot partition"));
$in->set_help('setupBootloaderBeginner') unless $::isStandalone;
@@ -198,7 +205,9 @@ sub setupBootloader {
bootloader::add_append($b, "mem", $memsize);
}
- while ($::expert || $more > 1) {
+ $ask_per_entries or last;
+
+ while (1) {
$in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone;
my ($c, $e);
$in->ask_from_(