From 7e2cfc1116c456a06528ed44b52c658c123a9fea Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 20 Nov 2003 09:55:56 +0000 Subject: fix anthill bug #110 (install looping on missing module snd-pcm-oss) --- perl-install/harddrake/sound.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'perl-install/harddrake') diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm index 728805730..f2286cb8c 100644 --- a/perl-install/harddrake/sound.pm +++ b/perl-install/harddrake/sound.pm @@ -146,20 +146,22 @@ sub do_switch { return if $old_driver eq $new_driver; my $_wait = $in->wait_message(N("Please wait"), N("Please Wait... Applying the configuration")); log::explanations("removing old $old_driver\n"); - rooted("service sound stop") unless $blacklisted; - rooted("service alsa stop") if $old_driver =~ /^snd-/ && !$blacklisted; - unload($old_driver); # run_program("/sbin/modprobe -r $driver"); # just in case ... + if ($::isStandalone) { + rooted("service sound stop") unless $blacklisted; + rooted("service alsa stop") if $old_driver =~ /^snd-/ && !$blacklisted; + unload($old_driver); # run_program("/sbin/modprobe -r $driver"); # just in case ... + } modules::remove_module($old_driver); # completed by the next add_alias() modules::add_alias("sound-slot-$index", $new_driver); modules::write_conf(); if ($new_driver =~ /^snd-/) { # new driver is an alsa one - rooted("service alsa start") unless $blacklisted; - rooted("/sbin/chkconfig --add alsa"); + rooted("service alsa start") if $::isStandalone && ! $blacklisted; + rooted("/sbin/chkconfig --add alsa") if $::isStandalone; load($new_driver); # service alsa is buggy } else { rooted("/sbin/chkconfig --del alsa") } log::explanations("loading new $new_driver\n"); rooted("/sbin/chkconfig --add sound"); # just in case ... - rooted("service sound start") unless $blacklisted; + rooted("service sound start") if $::isStandalone && !$blacklisted; } sub switch { -- cgit v1.2.1