After upgrading to module-init-tools-3.6, I receive the following output when trying to start the alsasound init script: * Loading ALSA modules... * Loading: snd-card-0... [ ok ] * Loading: snd-card-1... [ ok ] * Loading: snd-card-0... [ ok ] * Loading: snd-card-1... [ ok ] * Loading: kernelsnd-mixer-oss... FATAL: Module kernelsnd_mixer_oss not found. [ !! ] * Loading: kernelsnd-pcm-oss... FATAL: Module kernelsnd_pcm_oss not found. [ !! ] * Loading: kernelsnd-seq-oss... FATAL: Module kernelsnd_seq_oss not found. [ !! ] * Loading: kernelsnd-seq... FATAL: Module kernelsnd_seq not found. [ ok ] * Restoring Mixer Levels... [ ok ] It turns out that modprobe no longer gives the absolute pathnames for the modules by default (please refer to the URL). Therefore the output of 'modprobe -l' will look something like this: kernel/sound/core/oss/snd-mixer-oss.ko Compared to previous versions, which will output something like this: /lib/modules/2.6.28.4/kernel/sound/core/oss/snd-mixer-oss.ko This change breaks lines like this in /etc/init.d/alsasound (line 31 here): DRIVERS="${DRIVERS} $(modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p')" With module-init-tools-3.5, the above line will give the following output: snd-pcm-oss snd-mixer-oss snd-seq-oss Versus this from module-init-tools-3.6: kernelsnd-mixer-oss kernelsnd-pcm-oss kernelsnd-seq-oss Reproducible: Always Steps to Reproduce:
I'm no sed expert, but changing: modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p' to: modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' Fixes the problem. However, I don't know how to make this backwards compatible.
I've assigned it to the baselayout guys because this change may affect more than just alsa-utils, but I've CCed the alsa team in case they want to investigate possible sed changes.
This code has been problematic for a long time and will more likely be removed then patched up further.
Ah wait, now loading has been broken as well. Great.
does this really need changes to module-init-tools ? i imagine the alsa script could detect whether the path starts with a / and if it doesnt, prepend /lib/modules/`uname -r`/ ... i'll talk to upstream to see how things should go
Created attachment 181750 [details, diff] Proposed fix The fix seems pretty simple, just remove the obrigatory / at the beggining of the expressions Patch attached
(In reply to comment #1) > I'm no sed expert, but changing: > modprobe -l | sed -n -e '/snd.*oss/ s:\/.*\/\(.*\).ko:\1:p' > > to: > modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' > > Fixes the problem. However, I don't know how to make this backwards compatible. > Sorry, didn't see your reply, the patch i posted does exactly that, and it is backwards compatible, see: ~ $ echo "/lib/modules/2.6.28-gentoo-r1/kernel/sound/core/oss/snd-mixer-oss.ko" | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' snd-mixer-oss ~ $ echo "kernel/sound/core/oss/snd-mixer-oss.ko" | sed -n -e '/snd.*oss/ s:.*\/\(.*\).ko:\1:p' snd-mixer-oss
maybe i'm missing something, but why are you escaping the / in the replacement expression ? you're using a : as a delimiter, so there's no need for / to be escaped.
(In reply to comment #8) > maybe i'm missing something, but why are you escaping the / in the replacement > expression ? you're using a : as a delimiter, so there's no need for / to be > escaped. > You're right, it isn't needed, but it was there for the first time, so i just kept
fair enough. please 2 remove though as all of the \/\/\/\/\/ makes me cry ;).
Ok, sadly there's two bugs open for this. Since the other bug has an identical patch, but without the \/'s I'm going to mark this one as the duplicate, even though it was technically filed earlier... So, are we now just waiting for someone from the alsa herd to apply it? *** This bug has been marked as a duplicate of bug 258930 ***