summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-03-29 15:30:23 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-03-29 15:30:23 +0000
commitd0cf48bf5c629d174a78b68ccd185e149ecf2194 (patch)
treeda207d6adf27dcacf0c893198fec52126ad1c56e /perl-install
parentf98aa98498cd9560387c9d7426f5d82f29b2786d (diff)
downloaddrakx-d0cf48bf5c629d174a78b68ccd185e149ecf2194.tar
drakx-d0cf48bf5c629d174a78b68ccd185e149ecf2194.tar.gz
drakx-d0cf48bf5c629d174a78b68ccd185e149ecf2194.tar.bz2
drakx-d0cf48bf5c629d174a78b68ccd185e149ecf2194.tar.xz
drakx-d0cf48bf5c629d174a78b68ccd185e149ecf2194.zip
- disable imm/ppa probe during install since it causes some rubbish to be printed (bugzilla #12560)
- add an option in harddrake to probe imm/ppa
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/harddrake/data.pm8
-rw-r--r--perl-install/modules.pm12
-rwxr-xr-xperl-install/standalone/harddrake25
-rwxr-xr-xperl-install/standalone/service_harddrake2
4 files changed, 23 insertions, 4 deletions
diff --git a/perl-install/harddrake/data.pm b/perl-install/harddrake/data.pm
index 7a3060908..c03550acb 100644
--- a/perl-install/harddrake/data.pm
+++ b/perl-install/harddrake/data.pm
@@ -71,7 +71,13 @@ our @tree =
string => N("Zip"),
icon => "floppy.png",
configurator => "",
- detector => \&detect_devices::zips,
+ detector => sub {
+ my ($options) = @_;
+ if ($options->{PARALLEL_ZIP_DETECTION}) {
+ modules::load_parallel_zip($modules_conf) and $modules_conf->write;
+ }
+ detect_devices::zips();
+ },
checked_on_boot => 1,
automatic => 1,
},
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 4f4d3b3f2..eb1203ca5 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -122,7 +122,6 @@ sub load_category {
my @try_modules = (
if_($category =~ /scsi/,
- if_(arch() !~ /ppc/, 'parport_pc', 'imm', 'ppa'),
if_(detect_devices::usbStorage(), 'usb-storage'),
),
arch() =~ /ppc/ ? (
@@ -145,6 +144,17 @@ sub load_category {
map { { driver => $_, description => $_, try => 1 } } @try_modules;
}
+sub load_parallel_zip {
+ my ($conf) = @_;
+
+ arch() !~ /ppc/ or return;
+
+ eval { modules::load('parport_pc') };
+ grep {
+ eval { modules::load_and_configure($conf, $_); 1 };
+ } 'imm', 'ppa';
+}
+
sub probe_category {
my ($category) = @_;
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index b086e1a1e..ef6353d72 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -180,6 +180,7 @@ my %menu_options = (
'PRINTERS_DETECTION' => [ $menus{options}, N("/Autodetect _printers") ],
'MODEMS_DETECTION' => [ $menus{options}, N("/Autodetect _modems") ],
'JAZZ_DETECTION' => [ $menus{options}, N("/Autodetect _jaz drives") ],
+ 'PARALLEL_ZIP_DETECTION' => [ $menus{options}, N("/Autodetect parallel _zip drives") ],
);
@@ -194,6 +195,8 @@ my @menu_items =
sub { $options{MODEMS_DETECTION} = $check_boxes{MODEMS_DETECTION}->get_active }, undef, '<CheckItem>' ],
[ join('', @{$menu_options{JAZZ_DETECTION}}), undef,
sub { $options{JAZZ_DETECTION} = $check_boxes{JAZZ_DETECTION}->get_active }, undef, '<CheckItem>' ],
+ [ join('', @{$menu_options{PARALLEL_ZIP_DETECTION}}), undef,
+ sub { $options{PARALLEL_ZIP_DETECTION} = $check_boxes{PARALLEL_ZIP_DETECTION}->get_active }, undef, '<CheckItem>' ],
[ $menus{help}, undef, undef, undef, '<Branch>' ],
if_(-x "/usr/sbin/drakhelp_inst",
[ $menus{help} . N("/_Help"), undef, sub { unless (fork()) { exec("drakhelp --id harddrake") } }, undef, '<Item>' ],
@@ -359,7 +362,7 @@ foreach my $hw_class (@harddrake::data::tree) {
next if $Ident =~ /MODEM/ && !$options{MODEMS_DETECTION};
next if $Ident =~ /PRINTER/ && !$options{PRINTERS_DETECTION};
- my @devices = &$detector;
+ my @devices = $detector->(\%options);
next unless @devices; # Skip empty class (no devices)
push @classes, [ $Ident, $title, $icon, $configurator, @devices ];
}
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 644bd56bc..fedd0fd58 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -92,7 +92,7 @@ foreach my $hw_class (@harddrake::data::tree) {
my $i = $_;
my $id = defined $i->{device} ? $i->{device} : join(':', map { $i->{$_} } qw(vendor id subvendor subid));
$id => $i;
- } eval { &$detector };
+ } eval { $detector->({}) };
$config{$Ident} = \%ID;
next if !$is_globetrotter && !$force && is_empty_hash_ref($previous_config); # do not fsck on first run but if --force