diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-05-03 21:08:42 +0400 |
commit | 1058def8e7827e56ce4a70afb4aeacb5dc44148f (patch) | |
tree | 4495d23e7b54ab5700e3839081e797c1eafe0db9 /setup/Linux/oss/etc/S89oss | |
download | oss4-upstream.tar.gz |
Imported Upstream version 4.2-build2006upstream/4.2-build2006upstream
Diffstat (limited to 'setup/Linux/oss/etc/S89oss')
-rwxr-xr-x | setup/Linux/oss/etc/S89oss | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/setup/Linux/oss/etc/S89oss b/setup/Linux/oss/etc/S89oss new file mode 100755 index 0000000..5a1cdcd --- /dev/null +++ b/setup/Linux/oss/etc/S89oss @@ -0,0 +1,80 @@ +#!/bin/bash +# +# /etc/rc.d/init.d/oss +# +# Starts the OSS sound driver +# +# chkconfig: 2345 80 20 +# description: Open Sound System for Linux (OSS/Linux) is a \ +# commercial quality sound driver distributed by 4Front Technologies \ +# (http://www.opensound.com). + +### BEGIN INIT INFO +# Provides: oss +# Required-Start: $local_fs $remote_fs +# Should-Start: +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start OSS +### END INIT INFO + +# Source function library. +if test -f /lib/lsb/init-functions +then +. /lib/lsb/init-functions +fi + +if test -f /etc/rc.d/init.d/functions +then +. /etc/rc.d/init.d/functions +fi + +# Add oss configuration. +. /etc/oss.conf + +RETVAL=0 + +# +# See how we were called. +# +case "$1" in + start) + # Check if OSS is already running + echo -n 'Starting Open Sound System: ' + if ! test -f /usr/sbin/soundon + then + exit 0 + fi + + if test -f $OSSLIBDIR/starting + then + ls -l $OSSLIBDIR/starting + echo Previous start of OSS crashed the system + echo Please resolve the situation and remove file + echo \"$OSSLIBDIR/starting\". Then start OSS by + echo running soundon + exit 0 + fi + + if ! /usr/sbin/soundon + then + echo Starting OSS failed + fi + rm -f $OSSLIBDIR/starting + ;; + stop) + echo -n 'Stopping Open Sound System: ' + + /usr/sbin/savemixer + exit 0 + ;; + restart) + $0 stop + /usr/sbin/soundoff + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac |