summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-09-15 22:30:09 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-09-15 22:30:09 +0000
commitb5989b75d7a21e2eb2cdfadc2199489e286f25eb (patch)
tree9dff726e973c7a3cd3be1eb0dd24bf9f59a5f7e5
parent49cdb4136da1c9ddff4bc4a71ddf43ebf9ad1042 (diff)
downloaddrakx-backup-do-not-use-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar
drakx-backup-do-not-use-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.gz
drakx-backup-do-not-use-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.bz2
drakx-backup-do-not-use-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.tar.xz
drakx-backup-do-not-use-b5989b75d7a21e2eb2cdfadc2199489e286f25eb.zip
fix #5488: do not overwrite current driver if it's a viable driver for
the current sound card
-rw-r--r--perl-install/harddrake/sound.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 0996d9001..acef35303 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -294,8 +294,11 @@ The current driver for your \"%s\" sound card is \"%s\" ", $device->{description
sub configure_sound_slots() {
my $altered = 0;
each_index {
- $altered ||= modules::get_alias("sound-slot-$::i") ne $_->{driver};
- modules::add_alias("sound-slot-$::i", $_->{driver});
+ my $default_driver = modules::get_alias("sound-slot-$::i");
+ if (!member($default_driver, @{get_alternative($_->{driver})}, $_->{driver})) {
+ $altered ||= $default_driver ;
+ modules::add_alias("sound-slot-$::i", $_->{driver});
+ }
} detect_devices::getSoundDevices();
modules::write_conf() if $altered && $::isStandalone;
}