From 31642de8806104ca44bf47accb5443d9e7a63d75 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Aug 2002 18:01:17 +0000 Subject: - simplify - allocate sound slots in the same order as install2.pm (aka in modules::probe_category('multimedia/sound') order) --- perl-install/standalone/draksound | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'perl-install/standalone/draksound') 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: -- cgit v1.2.1