#!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: OSSPD="/usr/sbin/osspd" check_for_backend() { if [ -x "/usr/sbin/${OSSPD_BACKEND}" ] ; then CHOSEN_BACKEND="/usr/sbin/${OSSPD_BACKEND}" else eerror "Cannot find backend" return 1 fi return 0 } depend() { need fuse after alsasound } start() { check_for_backend || return 1 ebegin "Starting osspd with ${OSSPD_BACKEND} backend" start-stop-daemon --start --quiet --exec ${OSSPD} \ -- --dsp-slave=${CHOSEN_BACKEND} eend $? } stop() { ebegin "Shutting down osspd" start-stop-daemon --stop --quiet --exec ${OSSPD} eend $? }