Init script /etc/init.d/alsasound relies on if modprobe -c | grep -q "snd.*oss$" ; then check to see if to load OSS drivers. However, modprobe -c returns not only the contents of /etc/modprobe.conf, but also aliases it picks up from the modules themselves. In particular, if OSS modules are compiled, I get the lines like alias sound-service-?-8 snd_seq_oss alias sound-service-?-1 snd_seq_oss alias sound-service-?-12 snd_pcm_oss alias sound-service-?-3 snd_pcm_oss alias sound-service-?-0 snd_mixer_oss in the output i(towards the bottom) of modprobe -c although no OSS drivers are mentioned in configuration files. As the result the init script always loads them. Reproducible: Always Steps to Reproduce: 1. Have no mention of OSS drivers in /etc/modprobe.conf or /etc/modules.conf 2. /etc/init.d/alsasound start loads snd_pcm_oss, snd_seq_oss, snd_mixer_oss 3. Actual Results: cat /proc/modules show OSS modules present Expected Results: skip loading OSS modules. Parsing of the modprobe -c output should be changed
Since /etc/init.d/alsasound already uses parameters from /etc/conf.d/alsasound, it is perhaps the best to introduce LOAD_OSS configuration parameter and have at line 67 if ( [ "$LOAD_OSS" != "no" ] && modprobe -c | grep -q "snd.*oss$" ); then or something like that
You can now set ENABLE_OSS_EMUL to toggle that.