diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-08-18 04:32:24 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-08-18 04:32:24 +0000 |
commit | 94f257d030c1fd411ec48e438db18c657cd97e40 (patch) | |
tree | a4537ad6b19dde305ee0422c7b6a8c4ce104dd9b /perl-install/install_interactive.pm | |
parent | 3441ffe13a56f8b565e950b1c8e40c70b2acd97a (diff) | |
download | drakx-backup-do-not-use-94f257d030c1fd411ec48e438db18c657cd97e40.tar drakx-backup-do-not-use-94f257d030c1fd411ec48e438db18c657cd97e40.tar.gz drakx-backup-do-not-use-94f257d030c1fd411ec48e438db18c657cd97e40.tar.bz2 drakx-backup-do-not-use-94f257d030c1fd411ec48e438db18c657cd97e40.tar.xz drakx-backup-do-not-use-94f257d030c1fd411ec48e438db18c657cd97e40.zip |
no_comment
Diffstat (limited to 'perl-install/install_interactive.pm')
-rw-r--r-- | perl-install/install_interactive.pm | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index d6eeae823..6e60b8f6f 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -13,6 +13,7 @@ use partition_table qw(:types); use partition_table_raw; use detect_devices; use devices; +use modules; sub getHds { @@ -270,4 +271,53 @@ When you are done, don't forget to save using `w'", partition_table_raw::descrip %solutions; } +#------------------------------------------------------------------------------ +sub load_thiskind { + my ($o, $type) = @_; + my $w; #- needed to make the wait_message stay alive + my $pcmcia = $o->{pcmcia} + unless !$::beginner && modules::pcmcia_need_config($o->{pcmcia}) && + !$o->ask_yesorno('', _("Try to find PCMCIA cards?"), 1); + $w = $o->wait_message(_("PCMCIA"), _("Configuring PCMCIA cards...")) if modules::pcmcia_need_config($pcmcia); + + modules::load_thiskind($type, $pcmcia, sub { $w = $o->wait_load_module($type, @_) }); +} + +#------------------------------------------------------------------------------ +sub setup_thiskind { + 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) { + @l = $o->load_thiskind($type); + if (my @err = grep { $_->{error} } map { $_->{error} } @l) { + $o->ask_warn('', join("\n", @err)); + } + return if $auto && (@l || !$at_least_one); + } + @l = map { $_->{driver} } @l; + 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") ]); + } + } +} + 1; |