summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2000-08-18 03:24:16 +0000
committerdamien <damien@mandriva.com>2000-08-18 03:24:16 +0000
commit3441ffe13a56f8b565e950b1c8e40c70b2acd97a (patch)
tree4bead869bcb61d2fee785a93960aee1ed2ce37f2
parent820a204726a9107a24349034f5c023412f22444f (diff)
downloaddrakx-backup-do-not-use-3441ffe13a56f8b565e950b1c8e40c70b2acd97a.tar
drakx-backup-do-not-use-3441ffe13a56f8b565e950b1c8e40c70b2acd97a.tar.gz
drakx-backup-do-not-use-3441ffe13a56f8b565e950b1c8e40c70b2acd97a.tar.bz2
drakx-backup-do-not-use-3441ffe13a56f8b565e950b1c8e40c70b2acd97a.tar.xz
drakx-backup-do-not-use-3441ffe13a56f8b565e950b1c8e40c70b2acd97a.zip
committing to allow pixel to clean module handling
-rw-r--r--perl-install/install_steps_interactive.pm34
-rw-r--r--perl-install/modules.pm41
2 files changed, 68 insertions, 7 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 988945cd5..20a23e7cc 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -1162,6 +1162,7 @@ sub load_thiskind {
}
#------------------------------------------------------------------------------
+# (dam's) is not anymore used by setupSCSI
sub setup_thiskind {
my ($o, $type, $auto, $at_least_one) = @_;
@@ -1195,6 +1196,39 @@ sub setup_thiskind {
}
}
+sub setup_scsi_raid {
+ my ($o, $type, $auto, $at_least_one) = @_;
+
+ return if arch() eq "ppc";
+
+ my @l;
+ my $allow_probe = !$::expert || $o->ask_yesorno('', _("Try to find %s devices?", "PCI" . (arch() =~ /sparc/ && "/SBUS")), 1);
+
+ if ($allow_probe) {
+ eval { @l = grep { !/ide-/ } $o->load_thiskind($type) };
+ $o->ask_warn('', $@) if $@;
+ return if $auto && (@l || !$at_least_one);
+ }
+ while (1) {
+ my $msg = @l ?
+ [ _("Found %s %s interfaces", join(", ", @l), $type),
+ _("Do you have another one?") ] :
+ _("Do you have any %s interfaces?", $type);
+
+ my $opt = [ __("Yes"), __("No") ];
+ push @$opt, __("See hardware info") if $::expert;
+ my $r = "Yes";
+ $r = $o->ask_from_list_('', $msg, $opt, "No") unless $at_least_one && @l == 0;
+ if ($r eq "No") { return }
+ if ($r eq "Yes") {
+ push @l, $o->load_module($type) || next;
+ } else {
+ #-eval { commands::modprobe("isapnp") };
+ $o->ask_warn('', [ detect_devices::stringlist() ]); #-, scalar cat_("/proc/isapnp") ]);
+ }
+ }
+}
+
sub upNetwork {
my ($o, $pppAvoided) = @_;
my $w = $o->wait_message('', _("Bringing up the network"));
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 56b04629a..b4a6206f6 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -523,8 +523,13 @@ sub read_stage1_conf {
}
}
-sub load_thiskind($;&$) {
+sub load_thiskind {
my ($type, $f, $pcic) = @_;
+ show_load_thiskind($type, $f, $pcic, 1);
+}
+
+sub show_load_thiskind {
+ my ($type, $f, $pcic, $load) = @_;
my %loaded_text;
my @devs = grep { my $l = $drivers{$_->{driver}}; $l && $l->{type} eq $type } detect_devices::probeall('', $pcip);
@@ -535,11 +540,10 @@ sub load_thiskind($;&$) {
$devs{$mod}++ and log::l("multiple $mod devices found"), next;
log::l("found driver for $mod");
&$f($text, $mod) if $f;
- load($mod, $type);
+ $load ? load($mod, $type) : push @{$loaded{$type}}, $mod;
$loaded_text{$mod} = $text;
}
-
- if ($type =~ /scsi/) {
+ if ($load && $type =~ /scsi/) {
#- hey, we're allowed to pci probe :) let's do a lot of probing!
#- probe for USB SCSI.
@@ -554,12 +558,13 @@ sub load_thiskind($;&$) {
last if !$@;
}
}
- if (my ($c) = (detect_devices::matching_type('AUDIO'))) {
- add_alias("sound", $c->{driver});
+ if (my ($c) = (show_load_thiskind ('audio'))) { #detect_devices::matching_type('AUDIO'))) {
+ add_alias("sound", $c->{driver}); #- (dam's) this should be changed, we shouldn't use alias sound
}
}
+
my @loaded = map { $loaded_text{$_} || $_ } @{$loaded{$type} || []};
- $type =~ /scsi/ and @loaded and eval { load("sd_mod") };
+ $type =~ /scsi/ and @loaded and $load and eval { load("sd_mod") };
@loaded;
}
@@ -609,4 +614,26 @@ sub load_ide {
delete $conf{"ide-mod"}{options};
load_multi(qw(ide-probe ide-probe-mod ide-disk ide-cd));
}
+
}
+
+sub load_bordel {
+
+ #- probe for USB SCSI.
+ if (detect_devices::probeUSB()) {
+ eval { load("usb-storage", $type); sleep(2); };
+ -d "/proc/scsi/usb" or unload("usb-storage");
+ }
+ #- probe for parport SCSI.
+ if (arch() !~ /sparc/) {
+ foreach ("imm", "ppa") {
+ eval { load($_, $type) };
+ last if !$@;
+ }
+ }
+# if (my ($c) = (show_load_thiskind ('audio'))) { #detect_devices::matching_type('AUDIO'))) {
+# add_alias("sound", $c->{driver}); #- (dam's) this should be changed, we shouldn't use alias sound
+ }
+ }
+}
+