summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-03-19 21:32:12 +0000
committerRoy Marples <uberlord@gentoo.org>2007-03-19 21:32:12 +0000
commit8d585a790dd21586cc3063b9255b6764cf8c8617 (patch)
tree0065c561541e843a68db468eba386d0088ce4ba1 /media-sound/alsa-utils/files
parentRemove static use flag; bug #165528 (diff)
downloadgentoo-2-8d585a790dd21586cc3063b9255b6764cf8c8617.tar.gz
gentoo-2-8d585a790dd21586cc3063b9255b6764cf8c8617.tar.bz2
gentoo-2-8d585a790dd21586cc3063b9255b6764cf8c8617.zip
Only unload snd when it's loaded, #168367 thanks to Stephan Wezel.
(Portage version: 2.1.2.2)
Diffstat (limited to 'media-sound/alsa-utils/files')
-rw-r--r--media-sound/alsa-utils/files/alsasound.initd6
1 files changed, 3 insertions, 3 deletions
diff --git a/media-sound/alsa-utils/files/alsasound.initd b/media-sound/alsa-utils/files/alsasound.initd
index 30e4d73f01cf..4c8b8129d8b4 100644
--- a/media-sound/alsa-utils/files/alsasound.initd
+++ b/media-sound/alsa-utils/files/alsasound.initd
@@ -1,5 +1,5 @@
#!/sbin/runscript
-# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound.initd,v 1.4 2007/03/15 12:12:26 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound.initd,v 1.5 2007/03/19 21:32:12 uberlord Exp $
# Copyright 2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
@@ -107,14 +107,14 @@ unload_modules_recursive() {
unload_modules_26() {
# First of all, remove the snd module and all the modules depending
# on it, this should remove already most of ALSA modules.
- unload_modules_recursive snd
+ lsmod | grep -q "^snd[[:space:]]" && unload_modules_recursive snd
# Then find the remaining ones, and handle them too.
for module in $(lsmod | sed -n -e 's/^\(snd[^ ]*\) .*/\1/p'); do
unload_modules_recursive "${module}"
done
- lsmod | grep -vq '^snd'
+ lsmod | grep -vq "^snd"
}
terminate() {