summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-07-08 10:16:01 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-07-08 10:16:01 +0000
commit9634d83a5ef91e195c135a1c58d7269c8636c694 (patch)
tree9784a5de3182712139cbc71d68d8043b5b8bbc41
parent7f006e0213f75353531a216a0985769604c41ec1 (diff)
downloaddrakx-backup-do-not-use-9634d83a5ef91e195c135a1c58d7269c8636c694.tar
drakx-backup-do-not-use-9634d83a5ef91e195c135a1c58d7269c8636c694.tar.gz
drakx-backup-do-not-use-9634d83a5ef91e195c135a1c58d7269c8636c694.tar.bz2
drakx-backup-do-not-use-9634d83a5ef91e195c135a1c58d7269c8636c694.tar.xz
drakx-backup-do-not-use-9634d83a5ef91e195c135a1c58d7269c8636c694.zip
- s/snd-card/snd/
- make some code clearer
-rw-r--r--perl-install/modules.pm19
1 files changed, 5 insertions, 14 deletions
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index de06013db..6a87c4081 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -143,13 +143,10 @@ sub set_options {
sub add_alias {
my ($alias, $module) = @_;
$module =~ /ignore/ and return;
- /\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $module and return $_ foreach keys %conf;
+ /\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $module and return $_ foreach keys %conf;
log::l("adding alias $alias to $module");
$conf{$alias}{alias} ||= $module;
-
- if ($module =~ /^snd-card-/) {
- $conf{$module}{above} = 'snd-pcm-oss';
- }
+ $conf{$module}{above} = 'snd-pcm-oss' if $module =~ /^snd-/;
$alias;
}
sub add_probeall {
@@ -333,15 +330,9 @@ sub when_load {
add_probeall('scsi_hostadapter', $name);
eval { load('sd_mod') };
}
- if ($category =~ /sound/) {
- add_alias('sound-slot-0', $name);
- }
- if ($name =~ /^snd-card-/) {
- load('snd-pcm-oss');
- }
- if ($name =~ /usb-[uo]hci/ || $name eq 'ehci-hcd') {
- add_probeall('usb-interface', $name);
- }
+ add_alias('sound-slot-0', $name) if $category =~ /sound/;
+ load('snd-pcm-oss') if $name =~ /^snd-/;
+ add_probeall('usb-interface', $name) if $name =~ /usb-[uo]hci/ || $name eq 'ehci-hcd';
$conf{$name}{options} = join " ", @options if @options;
}