Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 222267

Summary: alsa-utils: add option to terminate alsa processes in init script
Product: Gentoo Linux Reporter: Steve Dibb (RETIRED) <beandog>
Component: New packagesAssignee: Gentoo ALSA team <alsa-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nightmorph
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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