View previous topic :: View next topic |
Author |
Message |
obmun n00b
Joined: 17 Jan 2004 Posts: 66 Location: Europe (Spain)
|
Posted: Sun Feb 08, 2004 12:28 am Post subject: Small alsasound init script "problem" |
|
|
First I must say hello to everyone in the list, since it's the first time I'm posting. I've been working with Gentoo for aprox. 1 month now (with kernel 2.6.x) and alsa without problems. I was tired of having to unmute and setup again the mixer levels each time I restarted the computer and I added the alsasound script to boot level today. Obviously, it works but there was one small error I didn't like: alsasound was loading more than one time alsa modules with the consequent modprobe Fatal error message because some modules were loading as dependencies of other modules. Just after that I discovered that a few hours ago, the mantainers of alsa-utils had updated the script to avoid that errors.
Here's the important part: the modifications they introduced (obviously they check if the module is already loaded before modprobing it) doesn't work for me. The problem? If you see in this code:
Code: | [ -z `cut -d' ' -f1 /proc/modules | egrep "^${DRIVER}\$"` ]; then |
they check if the next driver to be loded ($DRIVER variable) is loaded by listing modules. But (at least) in my gentoo the loaded module names have underscores (snd_ens1371) instead of the '-' of the module ko. The drivers to be loaded are obtained by doing a modprobe -c (that return the names with '-' from modules.conf). I thought using '-' in the module name was the usual. Am I wrong? Should I use the underscore in the modules.d files, or should be the alsasound script changed? Why do the names in the lsmod change to underscore?
Temporary, I have made the following change to my alsasound script:
Code: |
DRIVER="$(echo ${DRIVER} | sed 's/-/_/g')"
if [ ! "${DRIVER}" = off ] &&
[ -z `cut -d' ' -f1 /proc/modules | egrep "^${DRIVER}\$"` ]; then
| , adding also the sed replace line in the sequencer loading part of alsasound script.
I almost don't do any coding in bash, so if it's a simpler way of doing that substitution please tell me.
Thank you in advance for your answers. |
|
Back to top |
|
|
infirit l33t
Joined: 11 Jan 2003 Posts: 778 Location: Hoofddorp / The Netherlands
|
Posted: Sun Feb 08, 2004 11:02 am Post subject: |
|
|
I'm no scripting genius but your problem/solutions sounds logical. Please can you report it in bugzilla BUG# 32045 _________________ EASY TO INSTALL = Difficult to install, but instruction manual has pictures.
Join the adopt an unanswered post initiative today |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|