Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222267 - alsa-utils: add option to terminate alsa processes in init script
Summary: alsa-utils: add option to terminate alsa processes in init script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo ALSA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-15 14:51 UTC by Steve Dibb (RETIRED)
Modified: 2008-05-15 18:16 UTC (History)
1 user (show)

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 Steve Dibb (RETIRED) gentoo-dev 2008-05-15 14:51:31 UTC
@alsa,

Adding an option to /etc/conf.d/alsasound to terminate processes on stop.  The var name might need a better name.  Leave the default to on.

# TERMINATE_ON_STOP
# Do you want to kill any processes using ALSA when alsasound stops?
# Warning: may create some unexpected window behavior or
# crash running applications
# no - Do not terminate ALSA processes
# yes - Kill running processes
TERMINATE_ON_STOP="yes"

init script:

stop() {
        if [ ! -d /proc/asound ] ; then
                eerror "ALSA is not loaded"
                return 0
        fi

        [ "${SAVE_ON_STOP}" = "yes" ] && save

        if [ "${TERMINATE_ON_STOP}" = "yes" ] ; then
                ebegin "Killing processes using ALSA"
                terminate
                eend 0
        fi


If no objections, I'll commit later.
Comment 1 Tony Vroon (RETIRED) gentoo-dev 2008-05-15 15:02:04 UTC
Excellent idea. I'm all for it.
Comment 2 Steve Dibb (RETIRED) gentoo-dev 2008-05-15 18:16:36 UTC
Updated in CVS