Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 205094 - media-sound/alsa-utils: alsasound initscript uses nonportable (?) way to detect kernel version
Summary: media-sound/alsa-utils: alsasound initscript uses nonportable (?) way to dete...
Status: RESOLVED DUPLICATE of bug 207371
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 17:17 UTC by Matthijs Kooijman
Modified: 2008-04-09 23:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthijs Kooijman 2008-01-09 17:17:54 UTC
During shutdown, the alsasound initscript checks what the current kernel version is, as follows:

              /sbin/rmmod --version | grep -q module-init-tools \
                        && ver="26" || ver="24"

This works fine in general, but does not when using busybox to provide the rmmod command.

I would say that using the above to detect the difference between 2.6 and 2.4 is not very portable, and using something like uname -r should work better. However, I suspect that in reality, the script doesn't really check what kernel version is running, but if it uses the new module-init-tools module unloading style? Ie, in order to also allow 2.5 kernels to be used correctly?

In any case, my problem is that busybox rmmod does not support the --version option and thus throws an error on my console at shutdown. 

Can somebody perhaps enlighten me as to what the check is actually supposed to check?
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-01-09 17:22:39 UTC
(In reply to comment #0)
> using something like uname -r should work better.

Should be just removed altogether w/ 2.4 kernels being unsupported on Gentoo.
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2008-04-09 23:52:19 UTC
Marking this one as a duplicate since the other has a patch... ;]

*** This bug has been marked as a duplicate of bug 207371 ***