summaryrefslogtreecommitdiffstats
path: root/extra/aumix/aumix.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-26 08:28:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-26 08:28:23 +0000
commit753c8ec5f7819101807ad833ea3b5315f1181852 (patch)
treeec1a09a1b5bf7aff443246bbeafa110c3f9e36d9 /extra/aumix/aumix.initd
parent44ddbd6cdc9355973c52a8be09afdaf103011442 (diff)
downloadaports-753c8ec5f7819101807ad833ea3b5315f1181852.tar.bz2
aports-753c8ec5f7819101807ad833ea3b5315f1181852.tar.xz
extra/aumix: added missing initd and patches
Diffstat (limited to 'extra/aumix/aumix.initd')
-rw-r--r--extra/aumix/aumix.initd42
1 files changed, 42 insertions, 0 deletions
diff --git a/extra/aumix/aumix.initd b/extra/aumix/aumix.initd
new file mode 100644
index 00000000..2c1741b3
--- /dev/null
+++ b/extra/aumix/aumix.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/aumix/files/aumix.rc6,v 1.12 2007/03/25 13:05:51 drac Exp $
+
+depend() {
+ use modules hotplug coldplug alsasound
+}
+
+checkconfig() {
+ if ! grep -q -E 'sound|OSS|sparcaudio' /proc/devices && [ ! -d /proc/asound ] ; then
+ eerror "Sound support has not been compiled into the kernel,"
+ eerror "or is disabled. Please check that the correct modules"
+ eerror "is loaded."
+ return 1
+ fi
+ # /dev/mixer can be a symlink
+ if [ ! -e /dev/mixer ] ; then
+ eerror "/dev/mixer does not exist, please create it, or load the"
+ eerror "correct modules to enable your card's mixer"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ if [ -f /etc/aumixrc ] ; then
+ ebegin "Loading Mixer settings"
+ /usr/bin/aumix -f /etc/aumixrc -L >/dev/null 2>&1
+ else
+ ebegin "Setting Mixer settings"
+ /usr/bin/aumix -v75 -c75 -w75 >/dev/null 2>&1
+ fi
+ eend $?
+}
+
+stop() {
+ checkconfig || return 1
+ ebegin "Saving Mixer settings"
+ /usr/bin/aumix -f /etc/aumixrc -S >/dev/null 2>&1
+ eend $?
+}