summaryrefslogtreecommitdiff
blob: db1d5d655fc8ae23bb6db8bab41f1e1563b67dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdemud/files/cdemud.init.d-1.1.0,v 1.4 2010/02/09 06:32:08 pva Exp $

depend() {
	need dbus
	[ "${CDEMUD_AUDIO_DRIVER}" = alsa ] && need alsasound
}

start() {
	ebegin "Loading CDemu userspace daemon"

	start-stop-daemon --quiet --start \
		--exec /usr/bin/cdemud -- \
		-d -c /dev/vhba_ctl -n ${CDEMUD_DEVICES} -a ${CDEMUD_AUDIO_DRIVER}
	eend $?
}

stop() {
	ebegin "Stopping CDemu userspace daemon"
	/usr/bin/cdemud -k
	eend $?
}