summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-08-20 18:01:17 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-08-20 18:01:17 +0000
commit31642de8806104ca44bf47accb5443d9e7a63d75 (patch)
tree2bea5eb62d7789ea21b60c1c498c884ee9b2ebeb
parent717917c97697a47d75e7644150ee26f8e8052c2e (diff)
downloaddrakx-backup-do-not-use-31642de8806104ca44bf47accb5443d9e7a63d75.tar
drakx-backup-do-not-use-31642de8806104ca44bf47accb5443d9e7a63d75.tar.gz
drakx-backup-do-not-use-31642de8806104ca44bf47accb5443d9e7a63d75.tar.bz2
drakx-backup-do-not-use-31642de8806104ca44bf47accb5443d9e7a63d75.tar.xz
drakx-backup-do-not-use-31642de8806104ca44bf47accb5443d9e7a63d75.zip
- simplify
- allocate sound slots in the same order as install2.pm (aka in modules::probe_category('multimedia/sound') order)
-rwxr-xr-xperl-install/standalone/draksound18
1 files changed, 7 insertions, 11 deletions
diff --git a/perl-install/standalone/draksound b/perl-install/standalone/draksound
index 1744df1b4..319c6381a 100755
--- a/perl-install/standalone/draksound
+++ b/perl-install/standalone/draksound
@@ -22,31 +22,27 @@ use standalone; #- warning, standalone must be loaded very first, for 'expla
use strict;
use interactive;
-use detect_devices;
use common;
use harddrake::sound;
+use modules;
("@ARGV" =~ /--help|-h/) and die "usage: draksound [-h] [--help]\n";
-
my $in = 'interactive'->vnew();
-use modules;
-
-#no strict 'subs';
modules::mergein_conf('/etc/modules.conf');
my @devices = grep { $_->{media_type} eq 'MULTIMEDIA_AUDIO' } detect_devices::probeall(1);
if (@devices) {
# TODO: That need some work for multiples sound cards
- foreach (@devices) {
- # we should overwrite $device->{driver} with the right sound-slot-XX
- $_->{driver} = modules::get_alias('sound-slot-0');
+ map_index {
+ # allocate sound-slot in the same order as install2.pm $device->{driver} with the right sound-slot-XX
+ $_->{driver} = modules::get_alias("sound-slot-$::i");
harddrake::sound::config($in, $_);
- }
+ } modules::probe_category('multimedia/sound');
} else {
- $in->ask_warn(_("No Sound Card detected!"), formatAlaTeX(
- _("No Sound Card has been detected on your machine. Please verify that a Linux-supported Sound Card is correctly plugged in.
+ $in->ask_warn(_("No Sound Card detected!"),
+ formatAlaTeX(_("No Sound Card has been detected on your machine. Please verify that a Linux-supported Sound Card is correctly plugged in.
You can visit our hardware database at: