summaryrefslogtreecommitdiffstats
path: root/perl-install/modules.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-11 23:24:00 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-11 23:24:00 +0000
commit46a43fc836abed111ad47764a267b17c3f305594 (patch)
treec3083e51b9459e6567d1898bc3e49948621e97ea /perl-install/modules.pm
parent934c9d26a13eaa11b74af3b8762c7c57ae7fd141 (diff)
downloaddrakx-46a43fc836abed111ad47764a267b17c3f305594.tar
drakx-46a43fc836abed111ad47764a267b17c3f305594.tar.gz
drakx-46a43fc836abed111ad47764a267b17c3f305594.tar.bz2
drakx-46a43fc836abed111ad47764a267b17c3f305594.tar.xz
drakx-46a43fc836abed111ad47764a267b17c3f305594.zip
factorize imm and ppa in parallel_zip_modules
Diffstat (limited to 'perl-install/modules.pm')
-rw-r--r--perl-install/modules.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 265e5fcbf..44b119ed9 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -35,6 +35,8 @@ my %mappings_24_26 = (
my %mappings_26_24 = reverse %mappings_24_26;
$mappings_26_24{'uhci_hcd'} = 'usb_uhci';
+my @parallel_zip_modules = qw(imm ppa);
+
sub mapping_24_26 {
my ($modname) = @_;
$mappings_24_26{$modname} || $modname;
@@ -90,7 +92,7 @@ sub load_with_options {
my ($l, $h_options) = @_;
my @l = map {
- if_(member($_, 'plip', 'ppa', 'imm'), 'parport_pc'),
+ if_(member($_, 'plip', @parallel_zip_modules), 'parport_pc'),
if_($_ eq 'vfat', 'nls_cp437', 'nls_iso8859_1'),
dependencies_closure(cond_mapping_24_26($_));
} @$l;
@@ -112,7 +114,7 @@ sub load_and_configure {
my @l = remove_loaded_modules(dependencies_closure(cond_mapping_24_26($module)));
load_raw(\@l, { cond_mapping_24_26($module) => $o_options });
- if (member($module, 'imm', 'ppa')
+ if (member($module, @parallel_zip_modules)
&& ! -d "/proc/sys/dev/parport/parport0/devices/$module") {
log::l("$module loaded but is not useful, removing");
unload($module);
@@ -174,7 +176,7 @@ sub load_parallel_zip {
grep {
eval { load_and_configure($conf, $_); 1 };
- } 'imm', 'ppa';
+ } @parallel_zip_modules;
}
#-###############################################################################